Use CMD to delete large folders on Windows
Large folders on the system are one of the perpetrators who "consume" quite a lot of system space. A lot of folders that you create, after deleting, will come back later. Maybe it's junk folders that you try to remove.
To delete these folders, you can use right-click the folder and select the Delete option or press Shift + Delete.
However, with folders containing large files, you can use the Command Prompt to "clean up" these files.
1. Clean up the files in the folder
Step 1:
Open Command Prompt by entering cmd in the Search box on the Start Menu. From the search results list, click Command Prompt.
Or alternatively press the Windows + X key combination to open the Power User Menu. Here, click Command Prompt to open the Command Prompt window.
Step 2:
On the Command Prompt window, enter the following command into:
del /?
You can set the property next to the del command to / P or / F or / S, followed by the directory name.
Depending on whether you want to receive confirmation messages before deleting or forcing a folder to be deleted or deleting specific files in a folder. The explanation will be displayed on the Command Prompt window.
For example, using the del / P command hello, you will receive a confirmation message deleting all the files in the Hello folder.
2. Delete all folders, including files and subdirectories
If you want to delete the entire folder, including all subdirectories and folders, files, follow the steps below:
Step 1:
Open Command Prompt by entering cmd in the Search box on the Start Menu. From the search results list, click Command Prompt.
Or alternatively press the Windows + X key combination to open the Power User Menu. Here, click Command Prompt to open the Command Prompt window.
Step 2:
Enter the following command into the Command Prompt window:
rmdir /?
The location attribute next to rmdirn can be / S or / Q, depending on whether you want to delete the folder and the files in the particular directory.
Refer to some of the following articles:
- Use CMD to create an 'undeleted' folder on Windows
- All Frequency Restart, Shutdown, Remote Off . with Command Prompt
- No need to use an antivirus program, this is how to get rid of the virus on your computer
Good luck!
You should read it
- How to Change Directories in Command Prompt
- Xcopy command in Windows
- How to change the folder in Command Prompt on Windows 10
- How to Delete a File Using Command Prompt
- How to use Xcopy command in Command Prompt
- Add Command Prompt to Power User Menu on Windows 10
- 10 useful commands in Windows you should know
- Instructions for using Command Prompt
May be interested
- Here's how to uninstall the Product key on a Windows computerremoving the product key installation on a windows computer allows you to replace the other license key to re-enable the use of your windows computer. in particular, it is extremely useful in case you were previously using a trial license key, illegal pirated or key license key
- How to Stress Test Hard Drives on Your Computer or Server?do you want to know which hard drive is the fastest and is it really fast as committed by the manufacturer? no matter whether your pc or server, the free diskspd utility will stress test and benchmark your hard drives.
- The trick prevents Windows from automatically updating specific driverson windows operating systems, especially windows 10 usually automatically installs driver updates for hardware even if required or not required. if you do not want to automatically update dirver, you can proceed to prevent windows from automatically updating the driver. if you are using windows pro or enterprise version, you can use group policy editor to prevent windows from automatically updating drivers.
- Instructions to format USB Pendrives with Command Promptby default, windows users can usually format the hard drive, memory card, or usb by right-clicking on it and clicking the format option.
- No need to install any software, this is how to find the Windows Product Keysuppose you intend to reinstall windows, but you do not know or do not remember the product key to activate windows after the installation is completed and you cannot activate the newly installed operating system.
- How to fix error 0x8007045A ERROR_DLL_INIT_FAILED when using Windows Updateduring the process of using windows update or during an upgrade to windows 10 you receive an error message 0x8007045a error_dll_init_failed. this error occurs because the msxml dll file on windows operating system fails.