How to Delete files recursively in folders and sub-folders using the command prompt

20:53:00

How to Delete files recursively in folders and sub-folders using the command prompt?

To delete the files, first open a command prompt window and navigate to the folder you want to delete the files from. To do that use the Windows + R hotkey to open the run window, type in cmdwithout the quotes and hit enter.
Once the command prompt has opened navigate to the folder you want to recursively delete the files from. Once you are in the folder, issue the following command:
del /S abc.html
This command will delete all the files named test.txt inside the current folders, as well as from all the sub-folders present in that folder. The /Sdirective tells the del command to delete all the files recursively from within the folder and sub-folders. 
del /S /P *.jpg
Note: The /P tells the command to prompt the user before deleting the file, we recommend using this with wildcards.

Share the welth if it helped you :)

0 comments

Do Not Miss

Career file for NFS- All blacklist opened