Trying to set username variable in batch script
Hi,
So my server requires the username in the format:
This seems to cause problems when I attempt to put it all on the one line:
So I found another forum post where it is mentioned to use a variable for the username, by adding this line to the script:
and then using
When I try to run this it returns 'unknown command 'set'.'
My batch file is just simple:
and contents of script.txt:
Any help appreciated!
So my server requires the username in the format:
www.domain.com/email@address.com
This seems to cause problems when I attempt to put it all on the one line:
open sftp://www.domain.com/email@address.com:Password@www.domain.com
set /P USERNAME="www.domain.com/email@address.com"
%USERNAME%
for the open
script:
open sftp://%USERNAME%:Password@www.domain.com
My batch file is just simple:
WinSCP.exe /console /script=script.txt
Any help appreciated!