How to Delete Large Folders easily by CMD In windows

There are various larger folders that reside in our system that consume up a whole lot of space. Many of these folders would have been created long back and would consist of huge files inside them .They might be just the junk ones and you might attempt to get rid of them. The usual two ways followed by most of us are, either right clicking on such large folders and choosing the delete option, or pressing on the Shift + Delete button. In the latter case, the huge file gets deleted from the file explorer, or rather the Windows explorer. But in the current scenario these are considered to be the worst ways to do the needed. The main reason is that, before pushing them off to the Recycle bin, all the files inside the huge folder undergoes a check. This consumes much time. Also not all files get easily into the trash depending on their type.

If there are huge amounts of data that resides on these folders, then I would recommend you to stop using the Graphical User Interface tools like Windows explorer or File explorer. A more safer and easier way is to make use of the command line. Let us now look on to the various methods of cleaning up the folders for different purposes.

The files in your system start from a directory. These directories are further divided to folders and sub directories. Inside each such folders, you have the next level of hierarchy- the files.

See also : How to Delete Temporary Files in windows 10

Method 1:

Clean up the files by still resuming the folder structure.

Step 1:

Open up the command prompt by typing cmd on the search bar next to the Start menu. You find it in the bottom left of your desktop. Alternatively you can also choose it from the options provided by pressing on Windows key + X .

Screenshot (171)

Step 2:

Once the command prompt opens up type the following

del /?


You can set the attributes next to del as either /P or /F or /S followed by the folder name. They are chosen depending on whether you need a prompt for confirmation before delete, or deleting a folder forcefully or for deleting specific files from directory. The explanations will be provided in the command prompt.

Eg: del /P hello keeps up the structure of folder hello only after prompting for confirmation the cleaning up of all files in it.

Method 2:

You need to delete the entire folder including each and every sub directories and files.

You delete the entire directory along with all sub directories and folders without maintaining the folder structure.

Step 1:

Open up the command prompt as described in the previous method.

Screenshot (171)

Step 2:

Type on it the command

rmdir /?

where the attribute next to rmdir can either be /S or /Q depending on whether you want to delete the directory itself along with the files in the specifies directory or not.


Hope you don’t have trouble anymore in deleting the large folders!


Leave a Reply

Your email address will not be published.