Jun 25th, 2013, 01:40 PM
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.
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:
To open the found file with notepad use:
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
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.
Jun 25th, 2013, 11:14 PM
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)
Click Here to Expand Forum to Full Width
Survey posted by VBForums.