| Author | Message |
|---|---|
|
knockando
Joined: 04 Nov 2010
Posts: 12 |
Posted: 11 Nov 2010 22:14
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! |
| Advertisements |
|
|
knockando
Joined: 04 Nov 2010
Posts: 12 |
Posted: 11 Nov 2010 23:26
Put this in before executing the sync command but transferring all files, not just *.tar.gz
.WriteLine("option include *.tar.gz") |
|
prikryl
Site Admin
Joined: 10 Dec 2002
Posts: 16484 Location: Prague, Czech republic |
Posted: 12 Nov 2010
Please post your complete script file.
_________________ Martin Prikryl |
|
knockando
Joined: 04 Nov 2010
Posts: 12 |
Posted: 12 Nov 2010 15:15
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! |
|
knockando
Joined: 04 Nov 2010
Posts: 12 |
Posted: 12 Nov 2010 17:20
I changed
.WriteLine("option include "*.tar.gz"") to mask = "*.tar.gz" .WriteLine("option include" & " """ & mask & """") and it's working. |
| Advertisements |
|
You can post new topics in this forum
It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]
And it's free!
Site design by Black Gate