Scripts can use env variables
I suggest documenting better the fact that we can now (as of some version between 3.8 and 4.1.8) use %envvar% inside WinSCP scripts. All I found was it used in some example scripts. The main "script" page should have added somthing like:
You can use environment variables inside scripts similar to the way you can inside Windows batch files. Use the form %var1% in the script file and it will be replaced when the script is running by the current value of the environment variable "var1". You can set environment variables from the Windows command line with the command "set var1=\files\file1.txt" or they can be set from the system control panel. Click "Advanced" tab then the "Environment Variables" button and you can add and modify values. Note that the values you set under the control panel editor become active when you open a new DOS box but the "set" command causes instantaneous changes.
Or something like that. Maybe an example with a batch file and a script would make it clearer.
-- Lee
You can use environment variables inside scripts similar to the way you can inside Windows batch files. Use the form %var1% in the script file and it will be replaced when the script is running by the current value of the environment variable "var1". You can set environment variables from the Windows command line with the command "set var1=\files\file1.txt" or they can be set from the system control panel. Click "Advanced" tab then the "Environment Variables" button and you can add and modify values. Note that the values you set under the control panel editor become active when you open a new DOS box but the "set" command causes instantaneous changes.
Or something like that. Maybe an example with a batch file and a script would make it clearer.
-- Lee