SoFunction
Updated on 2025-03-10

Detailed explanation of the batch processing command for batch deletion of files in DOS commands

Click "Start" → "Run", enter: "CMD" and press Enter. Then enter:
del F:\_desktop.ini /f /s /q /a (F represents the drive letter you want to operate. If it is a disk C, change F to C)
Force delete the _desktop.ini file in all directories under F drive (including the X drive itself) and does not prompt whether to delete it.
/f means forced deletion of files
/s means that the file must be deleted in the subdirectories
/q means silent, no prompt
/aSelect the file to delete according to the attribute

R Read-only file S System file
H Hide file A Archive file
- Prefix indicating "No"

example:
Delete all specified files under F disk and its subdirectories
del F:/*.pdb /f /s /q /a (delete all files under F disk with suffix name pdb)

Batch production:
Create a new file with bat suffix, enter the above command, and save it.