Automating Windows Explorer Search file conversion from vbscript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TWFyY2VlcG9v?=

    Automating Windows Explorer Search file conversion from vbscript

    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\te st") 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.CreateO bject("Shell.Ap plication")
    objShell.FindFi les
Working...