I have a folder on my computer in which I have a lot of .jpg files.
I want to filter out all files that have a specific part in their name, for example:
We have a folder which contains files A.jpg
, B.jpg
, C_bad.jpg
, D_bad.jpg
, etc.
I want to delete every file that has "_bad" in its name.
Is something like this even possible? Or do I have to delete all these files manually?
Answer
I want to filter out all files that have a specific part in their name
You can do this with wildcards.
From a command line
To display matching files:
dir *_bad.jpg
To delete matching files:
del *_bad.jpg
Use the /s
option to match files in subdirectories as well as the current directory.
From Explorer
To display matching files:
- enter
*_bad.jpg
in the search box
To delete matching files:
- enter
*_bad.jpg
in the search box, select the results and press Delete or Del
No comments:
Post a Comment