
The sample script below is an example of using the GetPhysicalPath method to retrieve the physical path to a virtual folder.
Dim SFTPServer
Dim Sites, Site, aUsers
Dim CRLF
CRLF = (Chr(13)& Chr(10))
Set SFTPServer = CreateObject("SFTPCOMInterface.CIServer")
'Get Server address and administrative login
txtServer = inputbox("Host Address" & CRLF & CRLF & "Enter the host address of the server you want to connect to." & CRLF & _
"Use 'localhost' if you are connecting to the server on the local machine.","EFT COM Query")
txtPort = "1100"
txtUserName = inputbox("Admin Username" & CRLF & CRLF & "Enter the same username used for the GlobalSCAPE Enhanced File Transfer Server GUI Interface - a.k.a. your Administrative Login","EFT COM Query")
txtPassword = inputbox("Admin Password" & CRLF & CRLF & "Enter the same password used for the GlobalSCAPE Enhanced File Transfer Server GUI Interface - a.k.a. your Administrative Password","EFT COM Query")
SFTPServer.Connect txtServer, txtPort, txtUserName, txtPassword
set Sites=SFTPServer.Sites
set site = Sites.Item(0)
txtFolder = inputbox("Enter a VFS path" & CRLF & CRLF & "for root you can use /"& CRLF&"You do not need a trailing slash on the VFS path","EFT COM Query")
msgbox "physical path for " & txtFolder & " is:" & CRLF & CRLF & site.GetPhysicalPath(txtFolder)
SFTPServer.Close
set Site = nothing
set Sites = nothing
set SFTPServer = nothing