Topic "GET Multiple Files with Same Name and Append Timestamp"

Author Message
sethro

Guest


I'm trying to figure out a way to download multiple files (with same name) from a SFTP server while appending the timestamp based on remote file attribute show in WINSCP. Right now, we currently have a batch script that runs every morning to GET a file. This becomes an issue over the weekend when multiple files exist on the SFTP server thus are overwritten come Monday during the the GET.

I've looked at http://winscp.net/eng/docs/script_download_timestamped_filename#using_winscp_scripting but assume such logic is impossible with a batch Windows Shell script.

Is there any way to GET a file then rename it before GETTING the next file? Please let me know if you need more information or better description. Thank you.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Yes, it won't be easy to implement what you ask for using Windows batch file.
I recommend that you use WinSCP .NET assembly, possibly from a PowerShell script:
http://winscp.net/eng/docs/library
http://winscp.net/eng/docs/library_powershell

Note that we do not provide script writing services here. Please try yourself, and ask specific questions.
_________________
Martin Prikryl
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