undyingking: (Default)
undyingking ([personal profile] undyingking) wrote2010-10-22 10:43 am
Entry tags:

Search me

One annoying feature about Windows 7 is that it now only uses (what used to be called) Windows Desktop Search, and has ditched the perfectly fine file search included in XP. (This change may have alredy been made in Vista, I never used that.)

Although in theory more powerful, in practice it has some very irritating features. Boolean logic allows you to combine search terms -- good. But there is no way to escape some of the various operators etc as string literals. So if you want to eg. search for a file whose name includes the string "(1)", it will return all files that match "1", as parentheses are used in the syntax to combine search terms. You can escape the operators which are words by using quotes, eg. ""fish and chips"" will return differently to "fish and chips". But that doesn't work for the punctuational and mathematical symbols.

I spent far too long searching Microsoft's own help, and experimenting with various possible escape characters, before I gave up and Googled for the answer. It turns out that what you need is a search like "name:~"*(1)*"" which does the job perfectly.

(I scarcely need add that neither the tilde nor the asterisk are documented anywhere by MS, afaics.)

(Note: comments along the lines of "serves you right for using Windoze" are probably unnecessary :-)

[identity profile] vicarage.livejournal.com 2010-10-22 10:13 am (UTC)(link)
It is a shame they couldn't standardise on the Unix regexp syntax. But that would require backslashes, and we know that the / \ debacle was Bill's personal contribution to MSDOS.

[identity profile] bateleur.livejournal.com 2010-10-22 11:06 am (UTC)(link)
Serves you right for not using cygwin!

(Whilst obviously I couldn't resist the line, I'm not entirely joking. When I first used WinXP I was horrified that it still didn't have a halfway acceptable shell and basically decided at that point that life was too short to attempt to use Windows tools productively.)

[identity profile] undyingking.livejournal.com 2010-10-22 03:12 pm (UTC)(link)
Mm, I used to use Cygwin quite a lot at one time -- in the days of Windows 98 I guess. Since then I have become soft and decadent, and hardly ever resort even to Window's own feeble shell (or pseudo-shell).

There is Windows PowerShell which is supposed to make it a lot more capable, but I've never tried that.

[identity profile] bateleur.livejournal.com 2010-10-22 03:33 pm (UTC)(link)
Powershell looks like a programming language! I assume nobody would ever really type "Get-ChildItem" for "ls". :-/

[identity profile] undyingking.livejournal.com 2010-10-22 04:26 pm (UTC)(link)
I shall ask [livejournal.com profile] fractalgeek if he does :-)

[identity profile] mr-malk.livejournal.com 2010-10-22 11:10 am (UTC)(link)
My knowledge of programming and scripting languages is hardly exhaustive, nor even my knowledge of the many and varied customs there are in regular expression syntax, but I have never heard of using a tilde or an asterisk as an escape character before. How very... idiosyncratic (to be polite).

(Still kludging away on XP myself. I expect Windows 7 to be my next stop, as I refused to "up"grade to Vista on principle.

[identity profile] undyingking.livejournal.com 2010-10-22 03:02 pm (UTC)(link)
Mm, I avoided Vista vigorously. But 7 is generally pretty good I think.

[identity profile] fractalgeek.livejournal.com 2010-10-22 11:53 am (UTC)(link)
Desktop Search 4 as built into W7 is so much better than Search 3. There are "Power Shells", but for some reason RegExp only seems to be accessible in some places - eg Visual Studio or the scripting object.


The main issues I have are that it is much more difficult to search for stuff differentiating between filename and content, and that it doesn't work properly unless your indexes are up to date.

[identity profile] undyingking.livejournal.com 2010-10-22 03:15 pm (UTC)(link)
I never used 3 (or any earlier), so this is all new to me. I look forward to further investigations.

[identity profile] thecesspit.livejournal.com 2010-10-23 03:05 am (UTC)(link)
I spent today (well part of it) working out which characters windows will and won't accept as part of a file name (M$ only offers a script to run in VB to elicit them) and which ones were acceptable by flavours of Mac and Linux.

(If I ever were to write a version of Linux it would be called Cheese for obvious reasons).