Alan's Blog

"Yeah. I wrote a script that will do that."

Browse for Folder Scriptlet using Shell.Application

Posted on June 15th, 2011

The code fragment (scriptlet) which I have been using to pick a folder was written in 2002 based on code by Richard Mueller.  My code was inelegant, and awful.  It didn’t work too well in XP, and was worse still in Windows 7.  I have been writing a script that needed a folder picker, and decided to revist the issue.  Nine years of experience makes a big difference.   The resulting bit is NewBrowseForFolder.vbs.  This one works better than others because it has code to detect when what you are selecting resolves to a pathname.  I tested this in XP, Windows 7 (32 bit) and 2008 R2 (64 bit) without problems.

Tags: ,
Filed under Alan's Favorites, Scriptlets, VbScript | No Comments »

Please Note

All the scripts are saved as .txt files. Newer files have a "View Script" button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use "Save Target As". Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with Version 3 or 4.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient. It is pretty easy to figure out my email address from the scripts, and you are welcome to contact me that way.

Site Search

Categories

Archives

SQL Site

Bad Behavior has blocked 169 access attempts in the last 7 days.