How to get ENV Variable?
I want to create a folder with the name specified in the ENV variable and perform "put" operation. How can I read a variable from ENV and include in the script. Please suggest. Thanks!
Advertisement
Advertisement
mkdir %ENV%
You need to have WinSCP 4.1 beta for that.
mkdir %ENV%
You need to have WinSCP 4.1 beta for that.
I am using WinSCP 4.1 beta only. I have an environment variable "TEST" with the value Test. When I execute the command mkdir %TEST%, it actually creates %TEST% folder. Please suggest.
Below is the console capture.
winscp> option batch on
batch on
winscp> option confirm off
confirm off
winscp> open ftp://AM\Kumara:Password1@10.16.0.245:21
Connecting to 10.16.0.245 ...
Connected with 10.16.0.245. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] AM\Kumara@10.16.0.245
winscp> cd /Project/Razor/Prelude/Builds
/Project/Razor/Prelude/Builds
winscp> mkdir %TEST%
Error creating folder '%TEST%'.
%TEST%: Cannot create a file when that file already exists.
(A)bort, (R)etry, (S)kip: Abort
winscp>
winscp>
Advertisement
Advertisement
You can post new topics in this forum