Get & Put with WinSCP

Advertisement

CarterJohn11
Joined:
Posts:
1
Location:
USA

Get & Put with WinSCP

Hey All,

I'd like to move files from C:\Jobs\AF_SYNC\ and put them in a remote FTP folder. Once uploaded I'd like to delete the file from the C:\Jobs\AF_SYNC\.

In addition I'd like to automate a get or sync between a remote FTP folder and a local C:\Jobs\AF_INPUT\ directory. Is there a way to script this out in WinSCP then save as a batch file that I can schedule?

Some of these files will be pretty large so if possible some checks to make sure it uploaded correctly would be great.
Thank you for any assistance if someone has already done this.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,453
Location:
Prague, Czechia

Re: Get & Put with WinSCP

CarterJohn11 wrote:

I'd like to move files from C:\Jobs\AF_SYNC\ and put them in a remote FTP folder. Once uploaded I'd like to delete the file from the C:\Jobs\AF_SYNC\.
Just do
put -delete "C:\Jobs\AF_SYNC\*" "/remote/path/"

In addition I'd like to automate a get or sync between a remote FTP folder and a local C:\Jobs\AF_INPUT\ directory. Is there a way to script this out in WinSCP then save as a batch file that I can schedule?
WinSCP can generate a script template:
https://winscp.net/eng/docs/guide_automation#generating

See also:

Reply with quote

Advertisement

You can post new topics in this forum