Re: Figured it out
Yep that did it for me to generate a date for my logfile.
Thank you for you tip! :-)@echo off
@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Month=%%A
Set Day=%%B
Set Year=%%C
Set Logfile="%Year%%Month%%Day%_winSCP.log"
)
"F:\WinSCP\WinSCP.com" ^
/log=E:\Log\%Logfile% /ini=nul ^
WinSCP can do this on its own, without that huge (and unreliable) batch file construct:
/log=E:\Log\!Y!M!D_WinSCP.log
See https://winscp.net/eng/docs/ui_pref_logging#session_log