1
Automation Interface, Add-Ins and Tools / Re: VBSCRIPT - Select folder/file to save to
« on: September 15, 2022, 04:25:45 pm »Seems like you are taking the complicated path.
This is the function I use in my FileSystemFolder utility class: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Utils/FileSystemFolder.vbsCode: [Select]public function getUserSelectedFolder(startPath)
dim folder, shell
Set shell = CreateObject( "Shell.Application" )
if len(startPath) > 0 then
Set folder = shell.BrowseForFolder( 0, "Select Folder", 0,startPath)
else
Set folder = shell.BrowseForFolder( 0, "Select Folder", 0)
end if
if not folder is nothing then
set getUserSelectedFolder = New FileSystemFolder
getUserSelectedFolder.FullPath = folder.Self.Path
Session.Output "folder.Self.Path: " & folder.Self.Path
else
set getUserSelectedFolder = Nothing
end if
end function
Geert
Hi Geert,
I used that one, but the UI is different and not easy to navigate.