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

martin

Re: Shell variable in a Winscp script

No you cannot access remote shell variables.
plois00

Shell variable in a Winscp script

Hello,

Is it possible to access shell variable in a Winscp script?

Say before transferring FILE1 I want to make sure that FILE2 is present. I could write the following line of code:

call test -a FILE2 && export myFile=FILE1 || myFile=DUMMY

Next command would be the actual get:

get myFile

The GET will succeed or fail accordingly, which is fine for if FILE2 does not exist then the transfer of FILE1 should not occur.

The question is how to make known to Winscp the variable myFile.

I appreciate your help.
thank you,
PL