Topic "Sync local folder and ftp"

Author Message
Ljusto_struhar

Guest


Dear,

I want to create script who will do this:

-move files from folder C:/out to ftp://x.x.x.x/input
-move files from ftp://x.x.x.x/output to c:/in

Please help!

thanks a lot

Best regards,
Advertisements
Ljusto_struhar

Guest


This command

/command "option batch abort" "option confirm off" "open sftp://use:pwd@1xx.xx.xx.xx/input/" "put c:\out" "exit"

not move, just copy. I need to files be moved.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Add -delete switch:

/command "option batch abort" "option confirm off" "open sftp://use:pwd@1xx.xx.xx.xx/input/" "put -delete c:\out" "exit"

See http://winscp.net/eng/docs/scriptcommand_put
Ljusto_struhar

Guest


Dear,

Thank you for reply.

With this command, hole folder c:\out is moved to ftp://xx/input
so I have folder OUT in input.

I just need to move all files form out to input.
Ljusto_struhar

Guest


Dear,

I found solution for last post.
just put *, c:\out\*

How I can sync inversely. To move files form ftp://xx/output to C:/input
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Use get instead of put:
http://winscp.net/eng/docs/scriptcommand_get
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License