Synchronize and Mask Command

Advertisement

knockando
Joined:
Posts:
14

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!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,638
Location:
Prague, Czechia

Re: Synchronize and Mask Command

Please post your complete script file.
_________________
Martin Prikryl

Reply with quote

knockando
Joined:
Posts:
14

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!

Reply with quote

knockando
Joined:
Posts:
14

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

and it's working.

Reply with quote

Advertisement

You can post new topics in this forum