Hi , I am kind of a beginner in VBA. I want to download a file from remote server to local. Certain files get stored in subdirectories of a root folder and the subfolder names can be dynamic. I have the file name with me. I need to download the file from winscp to location without giving exact path
path : /u/test/
if this file is stored in /u/test/*/ (any subfolder , how can write the shell command)
errorCode = wsh.Run("C:\winscp577\WinSCP.com /command ""open user:pwd@domain"" ""lcd " & tempLocation & """ ""get /u/test/*/a.txt""" ""exit""", windowStyle, waitOnReturn)
The above code does not seem to work
So do you want to download all files stored anywhere in a remote directory tree to the same local folder?
Though you cannot use
in VBA. So you have to recursively use