File That Can List Search Results In Open Folder

December 27, 2013 at 15:58:34
Specs: Windows XP 64-Bit, Intel Quad/4096
Hey, my question is:

I'm sure there exists such a command that I can put inside a ".cmd" (or ".bat") file, (let's say that its location is in C:\), that when I open it, it will re-list that open folder (C:\) to all the folders that contain "asdf" in their name?

I know that there is the option of opening an explorer window (like C:\, for example), press F3, set the result options, and to search for "asdf", then on top, to click on File -> Save Search. See, I want that ".cmd", or ".bat", file to do something very similar to that, yet don't want it to open a new explorer window with the search options on the side waiting for me to click the Search button. (If I save a search result and open it, (it's a *.fnd" file), it would do that.)

Oh and also, I am Not looking for a command that would list the folder names into a text file. People seem to get confused about that.

Thank you.

message edited by pepanee


See More: File That Can List Search Results In Open Folder

Report •


#1
December 29, 2013 at 11:50:33
so you want a list of all folder names that contain asdf, but not in a text file? did you want them output to a command window then? Batch is far more limited than you think it is. I am sure that there is a ps or vbs script that would make a nice interface.

this will open explorer windows with files by wild card within the folder its in
for /f "tokens=*" %%n in ('dir /l /b /ad "asdf*"') do start "" explorer %%n

::mike

message edited by mikelinus


Report •

#2
December 29, 2013 at 20:32:43
Ah. I gave up after a couple of sessions staring at the post. Every time I looked, it appeared to have a whole different agenda. It would make for a good exercise in semantics analysis, and possibly a good basis for high-security encryption, but for me at least, it proves insoluble as stated. But, that's me! Always and forever clueless...
Apologies for non-answer, but (hint) maybe a better problem description with less ambiguity:

"I'm sure there exists such a command that I can put inside a ".cmd" (or ".bat") file, (let's say that its location is in C:\), that when I open it" ("it" refers to the batch, or navigatiion to the directory? Some people refer to launching executable code as "opening", ), "it" (I assume batchscript) "will re-list" (copy all files? list filenames? this one really confuses me) "that open folder (C:\) to all the folders that contain "asdf" in their name?" (understood that part, i think)

"I know that there is the option of opening an explorer window (like C:\, for example), press F3, set the result options, and to search for "asdf", then on top, to click on File -> Save Search. See, I want that ".cmd", or ".bat", file to do something very similar to that, yet don't want it to open a new explorer window with the search options on the side..."

As MIke pointed out, batch does not have control over GUI interfaces, which seems to be what you're aiming at (?). Batch cannot eliminate or otherwise satisfy a GUI dialogue box.
As far as I know, there is no directory-level version of "autorun.inf", which would activate upon "opening" a directory either in CMD or GUI. (If there is, someone please set me straight!)


Report •

#3
December 30, 2013 at 06:47:42
I wish I had looked back at your past questions, I see that you have already asked the same question earlier and didn't like the answers.

::mike


Report •

Related Solutions

#4
December 30, 2013 at 09:31:22
Here, I posted a picture of exactly of what I want: postimg.org/image/6agont3nh/

mikelinus (Reply #1): I want the output not in a text file, like you stated, nor in a command window; I want the results to show up inside that same exact Explorer window; so when I double click one of the results, it will direct me to that folder within Explorer.
I am not to tech wiz about what to do with what you stated:
"/f "tokens=*" %%n in ('dir /l /b /ad "asdf*"') do start "" explorer %%n"

nbrane (Reply #2): Sorry the post confused you a bit; "it would make for a good exercise in semantics analysis, and possibly a good basis for high-security encryption".. interesting haha.
• "that when I open it" -> 'it' refers to when i double click the ".cmd" or ".bat" file
• "will re-list" -> double clicking the ".cmd" or ".bat" file, within that Explorer window, will now list the search results instead of showing me the contents of what is inside of C:/

mikelinus (Reply #3): Yes, I have asked this question before, and I guess I just gave up on it or what not, so I re-posted it, a little clearer I hope.

PeP (Reply #4): hey! that's this post! i got jokes.


Report •

#5
December 30, 2013 at 12:55:23
I think the trouble is that, although I am sure that there is some trick that can be done with active x and internet explorer along side a non GUI based system, batch as a whole does not delve into what you want. It is probably far easier for you to just accept. That the window explorer with find will be the easiest GUI method.

::mike


Report •

Ask Question