copy pscp a file from window server to to remote linux server -
i want copy directory (pscp) windows server linux server target place name on linux server has new each time.when run below command,
> pscp -p -l root > -pw mypassword -r c:\programfiles\mybackups\root@linux_server:/root/mywindowsbackups/$(date)
the command substitution $(date) doesn't work. can 1 suggest how run ?
try following:
:: stripping `/` , `day of week` date set target_date=%date:/=-% set target_date=%target_date:* =% :: copying directory linux server based on system's date pscp -p -l root -pw mypassword -r c:\programfiles\mybackups\root@linux_server:/root/mywindowsbackups/%target_date%
Comments
Post a Comment