Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

knockando

I changed
.WriteLine("option include "*.tar.gz"")
to
mask = "*.tar.gz"
.WriteLine("option include" & " """ & mask & """")

and it's working.
knockando

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!
martin

Re: Synchronize and Mask Command

Please post your complete script file.
knockando

Put this in before executing the sync command but transferring all files, not just *.tar.gz

.WriteLine("option include *.tar.gz")
knockando

Synchronize and Mask Command

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!