Using local environment variables on winscp script
Hi Martin,
I am using WinSCP to connect to a server which is running OpenSSH. I use a script which is specified with /script option to winscp3.com. Both the local and remote are Windows 2000 box. My script looks like this:
option batch on
option confirm off
mkdir /home/test/$HOSTNAME
cd /home/test
put c:\test\*.zip
close
exit
The session (Test) is already stored in INI file as I have made the INI as storage rather than Registry. When Winscp3 is executed with the options like:
winscp3 Test /console /script=test.txt
It starts up the session, connects to the server but creates a folder as $HOSTNAME itself. I tried with $HOSTNAME, $COMPUTERNAME, %COMPUTERNAME% but it doesn't seem to work out. Need your help on this please. :cry:
I am using WinSCP to connect to a server which is running OpenSSH. I use a script which is specified with /script option to winscp3.com. Both the local and remote are Windows 2000 box. My script looks like this:
option batch on
option confirm off
mkdir /home/test/$HOSTNAME
cd /home/test
put c:\test\*.zip
close
exit
The session (Test) is already stored in INI file as I have made the INI as storage rather than Registry. When Winscp3 is executed with the options like:
winscp3 Test /console /script=test.txt
It starts up the session, connects to the server but creates a folder as $HOSTNAME itself. I tried with $HOSTNAME, $COMPUTERNAME, %COMPUTERNAME% but it doesn't seem to work out. Need your help on this please. :cry: