Linux environment vars

Advertisement

TristanX
Joined:
Posts:
3
Location:
Germany

Linux environment vars

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Linux environment vars

Can you be more specific about where you want to use the variables? Some example?
_________________
Martin Prikryl

Reply with quote

TristanX
Joined:
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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
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.

Reply with quote

Advertisement

You can post new topics in this forum