I changed
.WriteLine("option include "*.tar.gz"")
to
mask = "*.tar.gz"
.WriteLine("option include" & " """ & mask & """")
and it's working.
Dim winscp As Process = New Process()
winscp.FileName = "C:\Program Files\WinSCP\WinSCP.com"
winscp.Start()
.WriteLine("option batch abort")
.WriteLine("option confirm off")
.WriteLine("open sftp://" & username & ":" & password & "@" & remotehost)
.WriteLine("option include "*.tar.gz"")
.WriteLine("synchronize local -delete -criteria=time C:\apps\TransferHolding\pce\data\ /pce/data/AndyTest/")
I'm not getting errors back from
message As XPathNavigator In nav.Select("//w:message", ns)
Another note, I've tried this exact same script by manually typing the commands using WinSCP.com and it worked.
Thanks!
Please post your complete script file.
Put this in before executing the sync command but transferring all files, not just *.tar.gz
.WriteLine("option include *.tar.gz")
I'm trying to sync only *.tar.gz files to my local directory.
This works and syncs ALL files in /pce/data/test:
synchronize local -delete C:\apps\TransferHolding\pce\xmldata /pce/data/test/
This doesn't work, gives me Error listing directory '/pce/data/test/*.tar.gz'. No such file or directory:
synchronize local -delete C:\apps\TransferHolding\pce\xmldata /pce/data/test/*.tar.gz.
I've looked all over and the only thing I can find is 'Existing files only' but I'm not sure how to set that via scripting. I know my Mask is correct b/c 'ls /pce/data/test/*.tar.gz' returns my one file.
Thanks!