Topic "Help with Automated Transfer/Synchronize"

Author Message
FStopFive5@gmail.com
[View user's profile]

Joined: 2017-05-03
Posts: 1
Location: Denver
Hello all,

I’m hoping someone can help me wrap my head around how to schedule an automated transfer/synchronize from one SFTP server to another (in this case Production and Development).

In Production (which I assume would be remote) there are 2 files that get automatically uploaded each day. Once those two files are processed through an interface they are appended with a timestamp and moved into an archive folder. As an example:

Example_file_20170305_1200.csv

Example_file_20170305_1700.csv

What I’d like to do is schedule an automatic sync twice daily to copy both files over to a specific folder in our Development environment (which I assume would be local) and in the process, strip out the timestamp so that once the file is moved to our Dev server it would just look like this:

Example_file.csv

Both environments are SFTP and accessible via WinSCP. Maybe this is all really simple and I’m overthinking all of this…I just don’t want to inadvertently screw something up.

Any help or guidance would be greatly appreciated!

Cheers.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26553
Location: Prague, Czechia
If you want to just download the latest file from some folder to a fixed name in a local folder, do:

get -latest /remote/path/* C:\local\path\Example_file.csv

See https://winscp.net/eng/docs/script_download_most_recent_file

For scheduling, see https://winscp.net/eng/docs/guide_schedule
Advertisements

You can post new topics in this forum






Search

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