Windows find files problem

  • 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?

  • 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.

  • Umm, you could write a TSQL script to do the search!

    Steve (almost afraid to sign this one!)

  • Thanks for your help,

    I've had to correct 537 filenames by hand.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply