Topic "Linux environment vars"

Author Message
TristanX
[View user's profile]

Joined: 2013-10-21
Posts: 3
Location: Germany
Hello,

haven't found anything about how to use linux environment vars (eg. ${SOME_DIR})in WinSCP Scripts.
WinSCP is escaping the dollar sign and does not resolve the vars.

Can someone tell me, if and how it is possible to use linux environments in WinSCP Scripts ?

regards
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Can you be more specific about where you want to use the variables? Some example?
_________________
Martin Prikryl
TristanX
[View user's profile]

Joined: 2013-10-21
Posts: 3
Location: Germany
Hi,

a lot to do here. Somehow missed your answer.

I'm trying to syncronize a local folder with a folder on a server. The folder on the server
often changes its path (new version etc) and that's why it is accessed via an environment variable.

So my command looks like

synchronize local -delete -mirror "%SPEC_PATH%\idl" "${SPEC_PATH}/idl"

but resolution of the linux env. var fails. Even escaping doesn't help.
All i get is: Error listing directory '${SPEC_PATH}/idl'.

regards
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Ok, I see. Remote variables are not resolved in WinSCP commands (local are). There's no way to find value of the remote variables, at least with SFTP and FTP protocols.
TristanX
[View user's profile]

Joined: 2013-10-21
Posts: 3
Location: Germany
Ah, ok didn't know that.

Too bad...

but thanks for reply
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License