Posted: 2009-01-27 19:18
I suggest documenting better the fact that we can now (as of some version between 3.8 and 4.1. 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.
Location: Prague, Czechia
This is documented on a beginning of scripts commands section.
You can post new topics in this forum
And it's free!