I have a website dump which has about half a gig worth of images which have been converted to various file sizes. The structure goes like:
media/
1/
1.original.jpg
1.large.jpg
1.medium.jpg
1.small.jpg
2/
2.original.jpg
2.large.jpg
2.medium.jpg
2.small.jpg
etc...
I want a command that will search through all folders in media and delete any image which has original
in the name. Is this possible?
To delete a file, use the following command: del "<filename>" . For example, to delete Test file. txt , just run del "Test File. txt" .
Alternatively, head to the folder containing the files you want to delete, hit Shift + Right Click, and select Open a command window here. Then input "del [filename]" and press Enter.
Use the rm command to remove files you no longer need. The rm command removes the entries for a specified file, group of files, or certain select files from a list within a directory.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With