How to create a timestamp

Advertisement

vonix
Guest

How to create a timestamp

Hi,

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 user:password@example.com
# 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
close
# Exit WinSC

WinSCP Version 4.1.9

thx vonix
exit

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,262
Location:
Prague, Czechia

Re: How to create a timestamp

Please read documentation. If that does not help, come back.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum