View Full Version : Deleting EMPTY FOLDERS

04-18-2004, 12:29 AM
Yes, I want to delet a fold on my server wich i created, but it says that i cant delete it cuz its not empty... BUT IT IS, there is nothing in it, and even if there was i dont care I just wanna delete the whole thing, but why wont it let me do this????


Roy Sinclair
04-23-2004, 06:59 AM
I've stood there and know that position well ;).

Like me, you've only read half of the error message.

See the part that says "or is in use"?

It's "in use" if explorer has it open and is showing that it's empty. You must be using W2K or earlier because XP will now delete it even if you're in it (it automatically steps you up a level).

04-23-2004, 01:49 PM
Roy's correct, but I thought I'd add the *nix answer as well, since you didn't mention if your on Linux or Windows (windows was assumed)

If you do a ls -l folderName, you will see all the non-hidden items in that folder, however there may also be hidden files (such as .htaccess for example).

To get a listing of all the files in a folder, you should type:

$> ls -al folderName

This is all well and good, but how to delete? One way is to use rm with a recursive delete:

$> rm -r folderName

However, if there are any subfolders in "folderName" or files, this will fail. We can override this with the "force" option

$> rm -rf folderName

As long as you have permissions to every file in that folder, you folder will be gone!


$> rm -rf /

It will bring your system to a screaching halt!

04-23-2004, 06:23 PM
noo, noo, It was on a server and ONLY said that it is not empty, but anyways, after trying 4 ftp programms the 4th one was finally a good one and also was able to delte the folder :D

thanks for you help thought :D