Commandline parameters for Windows search?

S

StargateFan

I've searched and searched on the net but I can't find anything other
than what seem to be DOS bat-like commands to do a search but they
don't even seem to have anything to do with the Windows gui one.

The biggest problem with the Windows find files feature is that the
saved searches never have worked. I remember this being a problem as
far back as Win98SE, so this time, it's not just an XP problem.

I tried a trick I saw on the net of saving the search and then editing
the file in even SciTE, but didn't fare any better. That didn't work
at all. I don't have a binary editor so must admit, didn't try
editing them that way. But in the meantime, if there were some sort
of commandline syntax that would launch the search gui and populates
the search criteria [re file(s) and folder(s)], that would do the
trick. I wasn't able to find anything so far, though. Does anyone
know if this can be done and how?


Thx. :blush:D
 
S

StargateFan

Is this what your looking for?

How to launch Search Companion with the "Look in" option pointing to a specific folder or drive?
http://www.winhelponline.com/articl...n-pointing-to-a-specific-folder-or-drive.html

Yes! That's exactly along the right lines. I have 2 research folders
that I do into constantly to update and add to, etc.

Can this be fine tuned?

I'm going with the custom folder one:
*************************
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("myFolderPath ...")
objFolderItem.InvokeVerb("find")
*************************

Is there some way to set some parameters, i.e., so that search has
various variations on things like:

*.txt
*db*.txt
*pixA*.gif
whatever

Thanks! Much appreciated. :blush:D
ju.c


StargateFan said:
I've searched and searched on the net but I can't find anything other
than what seem to be DOS bat-like commands to do a search but they
don't even seem to have anything to do with the Windows gui one.

The biggest problem with the Windows find files feature is that the
saved searches never have worked. I remember this being a problem as
far back as Win98SE, so this time, it's not just an XP problem.

I tried a trick I saw on the net of saving the search and then editing
the file in even SciTE, but didn't fare any better. That didn't work
at all. I don't have a binary editor so must admit, didn't try
editing them that way. But in the meantime, if there were some sort
of commandline syntax that would launch the search gui and populates
the search criteria [re file(s) and folder(s)], that would do the
trick. I wasn't able to find anything so far, though. Does anyone
know if this can be done and how?


Thx. :blush:D
 
S

StargateFan

Yes! That's exactly along the right lines. I have 2 research folders
that I do into constantly to update and add to, etc.

Can this be fine tuned?

I'm going with the custom folder one:
*************************
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("myFolderPath ...")
objFolderItem.InvokeVerb("find")
*************************

Is there some way to set some parameters, i.e., so that search has
various variations on things like:

*.txt
*db*.txt
*pixA*.gif
whatever

Thanks! Much appreciated. :blush:D

[SNIP]

Sorry, though not obvious, would also like to add some pre-defined
content to search for, too, sometimes.

So I can set the folder, but many times also need something like:

- repetitive search for filetypes
- repetitive search of those filetypes for a text string in
"Containing text".

I'm hoping that since the folder can be pre-set, so can the rest.

Thanks! :blush:D
 
J

ju.c

"add some pre-defined content"

I don't think so, I've tried before. However, there is
always a way, finding it is the hard part. Good luck!


ju.c


StargateFan said:
Yes! That's exactly along the right lines. I have 2 research folders
that I do into constantly to update and add to, etc.

Can this be fine tuned?

I'm going with the custom folder one:
*************************
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("myFolderPath ...")
objFolderItem.InvokeVerb("find")
*************************

Is there some way to set some parameters, i.e., so that search has
various variations on things like:

*.txt
*db*.txt
*pixA*.gif
whatever

Thanks! Much appreciated. :blush:D

[SNIP]

Sorry, though not obvious, would also like to add some pre-defined
content to search for, too, sometimes.

So I can set the folder, but many times also need something like:

- repetitive search for filetypes
- repetitive search of those filetypes for a text string in
"Containing text".

I'm hoping that since the folder can be pre-set, so can the rest.

Thanks! :blush:D
 
S

StargateFan

I don't think so, I've tried before. However, there is
always a way, finding it is the hard part. Good luck!


ju.c

[snip]

Very true! By the time I'd posted this message, I'd already spent a
very considerable time over a period of a few days (besides time in
the paste) looking for a way to do this. My other software choice has
a limitation that I can't live with with regards to a specific
repetitive search I'll be doing throughout a series of folders.
Windows doesn't have as many options as my other search utility but it
will handle this one task very well ... if only I could preset the
parameters.

Don't ask my why saving a search does hardly anything so is worse than
useless <g>.

Thanks at any rate. :blush:D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top