Trying to search filenames with special characters in windows explorer (Windows 10)
I only want the files that have the two inside the brackets (2)
Use the following search expression:
name:~"*(2)*"
Notes:
~
is the literal string indicator and what follows has to match the entire file nameDepending on your needs
filename:
may be better thanname:
Before:
After:
Further Reading
Related videos on Youtube
Sia
Updated on September 18, 2022Comments
-
Sia over 1 year
Through a very annoying person's mistake, thousands of my files have been copied, often multiple times. This has resulted in thousands of files named filename(2), filename(3), etc.
My bright idea was to do a search for (2) and delete all the results, but the search keeps showing up all files that have the number 2 in the filename, instead of including the brackets.
I've tried name:~=(2), "(2)" and even "(2)""(2)" after searching for solutions elsewhere. None of them worked. I want to exclude files that just have a 2 in the filename, I ONLY want the files that have the two inside the brackets.
Can anyone help, please?
-
Vomit IT - Chunky Mess Style almost 7 yearsSo are you looking for a Windows Explorer solution only or would a script solution be sufficient as well?
-
-
DavidPostill almost 7 yearsWhy use a complicated PowerShell script when you can do it easily using the Explorer Search functionality?
-
LotPings almost 7 years@DavidPostill because of additional functionality? It does ashure to only delete binary equal files.
-
DavidPostill almost 7 yearsOK. But that's not what the question asked for :)
-
Sia almost 7 yearsI'm afraid I don't know how to use script at all, and David's solution worked for me. But thank you for the help!
-
DavidPostill almost 7 years@Sia Do you need more help? If this answered your question, please don't forget to accept the answer.
-
Sia almost 7 yearsNo, thank you, that fixed it! This is just my first time using this site and I didn't know about accepting the answer. Ticked!