Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Mahendran

Re: How to get ENV Variable?

I am sorry; I was wrong.

The window was opened before setting the variable and it wasn't able to get the name.

Now everything works fine.

Thanks for your help!
martin

Re: How to get ENV Variable?

How do you set the variable? Are you sure it is inherited properly into the environment you are running WinSCP from?
Mahendran

Re: How to get ENV Variable?

Is it a problem with this version?
Is there any other way that I can use it now?

Thank You!

Mahendran wrote:

martin wrote:

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>
Mahendran

Re: How to get ENV Variable?

martin wrote:

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>
martin

Re: How to get ENV Variable?

mkdir %ENV%
You need to have WinSCP 4.1 beta for that.
Mahendran

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!