Topic "Shell variable in a Winscp script"

Author Message
[View user's profile]

Joined: 2007-06-07
Posts: 6

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,
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24755
Location: Prague, Czechia
No you cannot access remote shell variables.
Martin Prikryl

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License