Many times, using the DOS command to delete a large number of folders and a large number of non-empty directories in the system has been plagued
Del command: delete one or more files. Del [/P] [/F] [/S] [/q] [/A [[:] attributes] nameserase [/P] [/F] [/S] [/q] [/A [[:] attributes] names specifies one or more files or directories. Wildcard characters can be used to delete multiple objects. If a directory is specified, all files in the directory will be deleted. /P prompts confirmation before deleting each file. /F force Delete read-only files. /S deletes the specified file from all subdirectories. /Q quiet mode. Confirmation is not required when deleting a global wildcard. /A select the file to be deleted based on the attribute. Attributes R read-only file S System File h hide file a archive file-Prefix indicating "no" if the command extension is enabled, Del and erase will change as follows: the display syntax of the/s switch is reversed, that is, only deleted files are displayed, but not files that cannot be found. Rd command: delete a directory. Rmdir [/S] [/q] [drive:] pathrd [/S] [/q] [drive:] path/S except the directory, all subdirectories and files under the specified directory will also be deleted. Used to delete a directory tree. /Q quiet mode. confirmation is not required when/s is used to delete the directory tree.
RD/s d: \ temp \
:
Attrib generally uses the command: + set properties-clear properties R read-only file properties a archive file properties S System File properties h hide file properties.
Attrib is used as follows:
For example, I want to add read-only, archive, system file, and hidden attributes to the ddd.exe folder in the D Drive's w folder. input the following in DOS:
Attrib + R + A + S + h d: \ W \ ddd.exe
Add the following attributes to the WWW folder on drive C:
Attrib + R + A + S + H c: \ www
If you cannot delete it, the following section will help you:
7Del
Del D: \ test.txt # delete a specified file. It cannot be a hidden, system, or read-only file del/Q/A/f d: \ temp \*. * Delete all files in the D: \ Temp folder, including hidden, read-only, and system files, excluding the subdirectory del/Q/A/f/s d: \ temp \*. * Delete D: \ Temp and all files in the subfolders, including hidden, read-only, and system files, excluding subdirectories.
:
Best Combination: Use del/Q/A/f/s d: \ temp \ * first \*. * Delete all the files in your temp folder, and then use RD/s d: \ temp \ to delete the directories and subdirectories in your temp folder.
Deleting a file is very small. You can see it clearly before deleting it. Important: Back up data in advance. One side of worry.