Posts Tagged ‘Shell.Application’

Browse for Folder Scriptlet using Shell.Application

Wednesday, 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.