Topic "adding a date to the file I am transferring"

Author Message
KingCleo

Guest


I am using SCP in a Unix script with the following command.

scp -P 222 -B /mydirectory/myfile.txt myuserid@00.00.000.000:incoming
The above command works fine, but what I really need to be able to do, which I currently do with FTP is append the date to the file when sending. SO I tried this and it fails.
Obviously there are different commands for SCP than FTP. Any help with this would be appreciated!


export DATE2=`date '+%Y%m%d'`

scp -P 222 -B /mydirectory/myfile.txt.$DATE2 myuserid@00.00.000.000:incoming
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