Topic "How to create a timestamp"

Author Message



i am trying to create a timestamp in a Backup Script. My Script pulls a File every 24 hours in a special folder, but i don't want to overwrite the old one. How can i create an timestamp?

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open
# Connect
open root:***@***
# Change remote directory
cd /srv/svn/repos_backups
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get backup_current.tar.bz2 ***\backup_current.tar.bz2 --> timestamp here
# Disconnect
# Exit WinSC

WinSCP Version 4.1.9

thx vonix
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26330
Location: Prague, Czechia
Please read documentation. If that does not help, come back.
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License