Topic "Get latest file and rename it with timestamp"

Author Message
Guest




Hi,

I´m having a problem trying to download the latest file and rename it with timestamp.

I tried to find/ understand a solution in the documentation but failing.

Hope someone of you can help me with a explanation/ example.

Script:

# Connect
open mysession
# Change remote directory
cd /export
# Force binary mode transfer
option transfer binary
# Download file to the local directory
get *.csv>1D D:\*.csv>1D.%TIMESTAMP-1D#yyyy-mm-dd%
# Disconnect
close
Guest




Hi again,

I solve this by using following statement:

get *.csv>1D U:\%TIMESTAMP-1D#yyyy-mm-dd%.csv

Thanks
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