HEELPBOOK - Let user select a folder from script (Visual Basic) ################ This little code snippet will let you to let an end-user to select a folder to pass to the logic to let your script to decide, for example, how to behave or what to do (decided by the programmer, obviously). On error resume next SET fso=createobject("scripting.filesystemobject") SET WshShell=WScript.CreateObject("Shell.Application") dirPath=WshShell.BrowseForFolder(0, "Select the path", &H4000, "").items().item().path IF right(dirPath,1)<>"\" THEN dirPath=dirpath & "\" END IF IF dirpath="\" THEN dirpath="You have to select a folder!" END IF msgbox dirpath #### NOTE: this script use the BrowseForFolder method. ############ ARTICLE INFO ############# Article Month: December Article Date: 24/12/2012 Permalink: http://heelpbook.altervista.org/2012/let-user-select-a-folder-from-script-visual-basic/ Source: http://www.heelpbook.net/ Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20 Google+ : https://plus.google.com/116990277568167008289/posts