Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

sethro

GET Multiple Files with Same Name and Append Timestamp

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 https://beta.winscp.net/eng/docs/script_download_timestamped_filename#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.