September 17, 2004 at 4:43 am
I am using the Windows file search (W2K3) in Windows Explorer to find files with a certain naming characteristic.
The problem is that I have to search for all files containing a comma or semi-colon. Unfortunately Windows thinks that these characters should act as an OR statement in the search, so *,* returns every file on the drive!
How do I tell W2K3 to treat the , as a literal?
September 17, 2004 at 2:11 pm
One possible way which works on XP (I don't have 2003 around to play with yet). And it won't work from explorer, but it can be done from a command prompt using DIR with the /s switch. Switch to the root of the drive and then if you know what position the semicolon is in, you can issue something like:
DIR /s ??";"*.*
which in this case would return only files that had a semicolon in the third position of the filename. If the semicolon were in the first position, it would just be
DIR /s ";"*.*
It would be tedious, but doable to issue a ?";" ,then ??";", then ???";", etc. until you got them all. Or you could put them all in a batch file with a '|more' to display the results one screen at a time. Maybe DOS lives after all?
Hope this helps some.
My hovercraft is full of eels.
September 17, 2004 at 3:49 pm
Umm, you could write a TSQL script to do the search!
Steve (almost afraid to sign this one!)
September 20, 2004 at 1:37 am
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply