Re: DATE variable for script to tranfer a folder from W do U
There's no "set" command in WinSCP.
You probably wanted to do somethink like:
runwinscp.bat:
set Stats_dd-mm-yyyy=Stats_%date:~4,2%-%date:~7,2%-%date:~10,4%
winscp.com /script=script.txt
script.txt:
option batch abort
...
open sftp://user:password@example.com -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
...
put C:\Scripts\output\%Stats_dd-mm-yyyy% /tmp/test_Stats/
You probably wanted to do somethink like:
runwinscp.bat:
set Stats_dd-mm-yyyy=Stats_%date:~4,2%-%date:~7,2%-%date:~10,4%
winscp.com /script=script.txt
script.txt:
option batch abort
...
open sftp://user:password@example.com -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
...
put C:\Scripts\output\%Stats_dd-mm-yyyy% /tmp/test_Stats/