Synchronize local with "get -delete" on remote

Advertisement

lnedad
Guest

Synchronize local with "get -delete" on remote

Is there an easy way to use synchronize to get all the new files in a remote directory and then delete them once they are on the local directory. (Also, I never want to delete files from the local directory).

Reply with quote

Advertisement

log10
Joined:
Posts:
1

Re: Synchronize local with "get -delete" on remote

martin wrote:

What would you use such function for?

I have hundreds of log files that need to be downloaded from different servers. I would like to download them if they don't exist or are not changed on the local server and delete them on the remote server once they are "safely" on the local server.

Reply with quote

martin
Site Admin
martin avatar

Re: Synchronize local with "get -delete" on remote

So once you do that (e.g. manually), you will end up with no remote files. So the next times you just need to do "get -delete". Right?

Reply with quote

AoR
Guest

Hello

I have a little problem by using the "get" command within a scripting file. If I use get in this way

get -delete *.csv \\Server-name\directory\

I get an error like

. 2009-01-14 12:00:43.278 Getting current directory name.
. 2009-01-14 12:00:43.278 Listing file "-delete".
> 2009-01-14 12:00:43.278 Type: SSH_FXP_LSTAT, Size: 39, Number: 263
< 2009-01-14 12:00:43.278 Type: SSH_FXP_STATUS, Size: 29, Number: 263
< 2009-01-14 12:00:43.278 Status/error code: 2, Message: 263, Server: No such file, Language:
. 2009-01-14 12:00:43.278 Closing connection.

Which is the correct way to use the "-delete" Switch?

Reply with quote

Advertisement

martin
Site Admin
martin avatar

AoR wrote:

Which is the correct way to use the "-delete" Switch?
You are using it correctly. However you probably use old version of WinSCP. Switches such as -delete are supported since WinSCP 4.1 only.

Reply with quote

Advertisement

You can post new topics in this forum