i want to use System-Environment-Variables in my script-file like this:
winscp.exe /console /script=ftp.txt
option batch on option confirm off # Connect open ftp://user:passwd@host_ip # Change remote directory cd testfolder # Force binary mode transfer option transfer binary # Upload file put update.log %COMPUTERNAME%.log # Disconnect close # Exit WinSCP exit
The upload went fine, but the remote-filename is not like expected myhostname.txt but %COMPUTERNAME%.txt so the variable is not translated.
What went wrong?