What is a util i can use to recursively delete empty folders? empty is considered to be true if the directory has no directory no files exist excepting useless/generated files (thumbs, .DS_Store, etc)
feedback
|
|
| |||||
feedback
|
|
Your question is unclear Here is me removing an empty directory there, I created one, then removed it. If there are things in it then it is not empty. You can use rmdir /s if there are things in it. C:\>rmdir f C:>rmdir /s f C:\> And you can do all that without the command prompt. Recursion is a concept in programming. I don't think you mean that. And whether something is implemented using recursion or not, is irrelevant to you since no doubt you don't intend to limit yourself.. and you weren't just intellectually curious about implementations. You should rewrite your entire question. And if you are having trouble deleting a directory, then think for example, about what error you get when you try to delete the directory you are struggling to delete. You could always boot off a live CD and delete it. OK.. I see velio and moab figured out what you want to do. Really you could have asked your question without redefining the word empty. It already has a meaning which is obvious and shared with english and even rmdir uses the term. | |||||||
feedback
|
|
Here is a command line one-liner that will delete every actually empty (i.e. zero files) directory in the folder and below:
Basically this gets a recursive listing of all directories starting from the current and then attempts to remove each directory. The | |||
|
feedback
|
|
Belvedere can do that, but you'll need to be more specific than "useless" to be able to set up the right rules. | |||
|
feedback
|
|
Use Command Prompt from Start\ Run (or the combination Windows key and R). Write cmd to start the console then navigate to the drive the directories are on by inputting the drive letter (e.g. if they are on D:\ you put d:). The path of the Command will change to the desired path then use the command cd to travel to the empty directories parent folder (cd D:\ParentDirectory). You can use the Tab for Windows to put the entire path. Once arrived at the parent directory use del /F EmptyDirectory1 This method is the best one and also will delete folders or files that can't be deleted by Windows Explorer. | |||||
feedback
|