Windows CMD Search and Delete file by name Windows CMD Search and Delete file by name windows windows

Windows CMD Search and Delete file by name


del /s ...\media\*original*.jpg

should delete all files with original in their name, extension .jpg from ...\media and all its subdirectories.

Obviously, use with extreme caution...If you desire to see what you are going to delete first before deleting it use

dir /s ...\media\*original*.jpg


Try with something like this:

for /R C:\...\media %f in (*original*.jpg) do del /q "%~ff"

Replace % with %% if you want to use this in a batch script.