Command Line Tool To Remove Empty Folders And Directories: DirClean

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




DirClean is a free command line tool that lets you easily remove empty folders and directories from your system. It’s a simple and handy tool that scans a given directory structure for empty folders and directories, and delete them if you wish. DirClean provides options to scan directories recursively, log empty directories to console, and prompt for user confirmation before deleting folders.

DirClean works though the command prompt and is ideal for removing dead folders from your system. You just have to specify the directory you want to search for empty folders, and appropriate options to carry out the desired command. The link given at the end of this article will direct you to the download page of DirClean. After downloading and installation, you can launch this little console app through the command prompt and use it to remove empty folders from your system. Let’s see how.

DirClean interface

Remove Empty Folders though Command Prompt using DirClean:

DirClean is quite easy to use. First click on the “Start” button, type “cmd”, and press “Enter” to run the command prompt. Now navigate to the location where DirClean is kept.

DirClean open

Now you are almost there. Just type “dirclean”, specify a directory you want to scan (with -i argument), and enter options you want Dirclean to execute with the command. To view the option list, you can type “dirclean -h”. This will open the help file showing all available options under DirClean.

DirClean help

For example, I have typed “dirclean -i “C:\Users\Sangeeta\Desktop\ILFS Test” -r -c -p -d” to remove empty folders and directories from a test folder. The “-i” option tells which directory I want to scan, “-r” option commands DirClean for recursive scan, “-c” option logs empty directories to console, “-p” option enables prompt to confirm delete, and “-d” option deletes the directories.

DirClean command

Note: Specify the directory address in double quotes. DirClean won’t work with single quotes (as shown in the example usage).

Key Features of DirClean:

  • Free software to remove empty folders and directories. 
  • Log empty directories to console.
  • Prompt for delete confirmation.
  • Runs through console.
  • Easy to use.
  • Simple and lightweight.
  • Help file available.

Also check out some other freebies we reviewed earlier: Compare Folders, Folder Size, and Sub4Del.

The Final Verdict:

DirClean is a handy command line tool for removing empty directories and folders from your system. It takes less system resources and performs recursive search to identify empty folders. However, you are advised to backup the source folder to avoid data loss in case you use an unintended command. Give it a try.

Get DirClean here!

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]
Works With: Windows
Free/Paid: Free

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer