
There are many larger folders residing on our system and taking up a lot of space. Many of these folders would have been created a long time ago and would consist of huge files within them. It might just be the junk files and you might try to get rid of them. The two common ways most of us follow are to right click on such large folders and choose the delete option or press Shift + Delete button. In the latter case, the huge file is removed from the file explorer, or rather from the Windows explorer. But in the current scenario, these are considered to be the worst ways to do what is needed. The main reason is that, before being moved to the trash, all the files within the huge folder undergo a verification. This takes a long time. Also, not all files can be easily trashed based on their type.
If there is a large amount of data residing in these folders, I recommend that you stop using graphical user interface tools like Windows Explorer or File Explorer. A safer and easier way is to use the command line. Let's now take a look at the various methods of cleaning up folders for different purposes.
Files on your system start from a directory. These directories are in turn divided into folders and subdirectories. Within each of these folders, you have the next level of hierarchy: files.
See also: How to delete temporary files in Windows 10
Method 1:
Clean up files by resuming folder structure.
Step 1:
Open the command prompt by typing cmd in the search bar next to the Start menu. You will find it at the bottom left of the desktop. Alternatively, you can also choose it from the options provided by pressing Windows key + X.
Step 2:
Once the command prompt opens, type the following
from /?
You can set the attributes next to del as / P or / F or / S followed by the folder name. They are chosen depending on whether a confirmation message is required before deleting, forcibly deleting a folder, or deleting specific files from the directory. Explanations will be provided at the command prompt.
For example: del / P hello maintains the structure of the Hello folder only after requesting confirmation to clean all the files it contains.
Method 2:
You need to delete the entire folder, including every subdirectory and file.
Delete the entire directory along with all subdirectories and folders without keeping the folder structure.
Step 1:
Open the command prompt as described in the previous method.
Step 2:
Write the command in it
rmdir /?
where the attribute next to rmdir can be either / S or / Q depending on whether or not you want to delete the directory itself along with the files in the specified directory.
Hope you no longer have a problem deleting large folders!