Quick file access script-VBForums
Results 1 to 2 of 2

Thread: Quick file access script

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2013
    Posts
    1

    Quick file access script

    Just a quick share, I always found this small VB script extremely handy to access files on my flash drive. It only requires a decent memory (mentally) to partially remember file names and a love for your keyboard is also applicable.



    It basically works like this:
    You add the folder path containing the script file to the PATH variable. Next, relogon and run the script with a parameter from the run box.

    for example:
    go.vbsc auto

    Note that you will be typing the file extension because the windows shell doesn't automatically recognize VBS files if no extension has been specified. To solve this; create a shortcut in the same folder as the script and name it whatever you like. 'go myfile' will work now assuming that the shortcut is named 'go.lnk'


    Resized to 60% (was 837 x 539) - Click image to enlargePosted Image


    Typing the full name is unnecessary, if the script matches more than one file then it will prompt for a selection.
    For an exact match, use the following syntax:
    go x:myfile

    To open the found file with notepad use:
    go n:myfile

    To match certain attributes, use a second argument:
    go myfile rhs
    will match read-only, hidden and system files

    To match a folder use:
    go myfolder d



    Important:
    It has to run in a command line environment. I advice to use a special 'vbsc' extension for command-line scripts.
    You can use this registry script if you wish: http://pastebin.com/yE9cxF5f

    And ofcourse, to set the folder to search in on each execution, change the SearchPath variable.

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    3,164

    Re: Quick file access script

    Where is the script ???
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.