By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

Automating Windows Explorer Search file conversion from vbscript

P: n/a
I'm a newbie using Visual Studio and Vb.Net.
The vbscript below opens a Windows Explorer Search Window.
The Windows Explorer Search Window has fields in which the user can insert:
(i) a search String Filter, and (ii) a search path String.
1. I can't figure out how to convert the vbscript so that it runs as a
Visual Basic standalone .exe file.
I'd appreciate any help re what code to use, and re which references are
needed.
2. I'd like to send the exe a couple of arguments, i.e., strings to use in
automating the Windows Explorer Search Window.
I can't figure out what code to use to insert:
1. A search filter string (e.g., "*.pdf") in the field entitled "All or
part of the file name"; Or
2. A search path string (e.g., "k:\data\test") in the field entitled:
"Look in:"

When I ran the vbscript below, I tried using Sendkeys,
(Alt-L = "Lookin in:" field)
(Alt-O = Filename/filemask field, "All or part of the file name:")
(Alt-R = "Search" button)
But Sendkeys doesn't seem to trigger any action at all in the search window.

Any suggestions would be much appreciated.

Marceepoo

Dim objShell
Set objShell = WScript.CreateObject("Shell.Application")
objShell.FindFiles
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.