allow environment variables in "directory" settings

Advertisement

bblackmoor
Guest

allow environment variables in "directory" settings

In the saved settings for each connection, there are settings for the local and remote directory. I would like to be able to use environment variables in these fields. For example:

%MY_DOCUMENTS%/WWW/Some_Web_Site/somewebsite.org

Reason: I typically have a similar file structure on each workstation I use. However, on some workstations I have multiple drives, so I move my "My Documents" to D: (or to some other drive), while on my laptop (or some other smaller computers) "My Documents" is in it's default location, somewhere way under "C:/Documents and setting/....".

By setting a MY_DOCUMENTS environment variable, and using it in the "directory" settings, I would be able to easily share my WinSCP settings across all of my workstations.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
32,052
Location:
Prague, Czechia

Re: allow environment variables in "directory" settings

Make sense for local directory. But only as an initial value, if you have Remember last used directory turned on.
I guess, it makes no sense to use local variables for remote directory.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
32,052
Location:
Prague, Czechia

Re: allow environment variables in "directory" settings

This issue has been added to tracker.
_________________
Martin Prikryl

Reply with quote

level20peon
Guest

resolved ?

Hey guys,

although this tracker ticket is marked "resolved" this functionality still doesn't seem to be implemented. Am I missing something here ? (Tested with version 4.26)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
32,052
Location:
Prague, Czechia

Re: resolved ?

It is marked as duplicate.
_________________
Martin Prikryl

Reply with quote

Advertisement

saud
Donor
saud avatar
Joined:
Posts:
12
Location:
Home

I have the same problem, I use OneDrive for all my web development work and shared folders between home and work. Environment Variable is giving me error, same with %OneDeive%\WinScp.ini so that I can have same settings across all my computers.

Can someone confirm this bug?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
32,052
Location:
Prague, Czechia

saud wrote:

I have the same problem, I use OneDrive for all my web development work and shared folders between home and work. Environment Variable is giving me error, same with %OneDeive%\WinScp.ini so that I can have same settings across all my computers.

Can someone confirm this bug?
WinSCP does not support environment variables in the initial local path.
The feature request was closed by mistake, I have reopened it:
https://winscp.net/tracker/150
You can vote for it in the tracker.

Reply with quote

Advertisement

saud
Donor
saud avatar
Joined:
Posts:
12
Location:
Home

Hello Martin, any update on the request, it is an important feature for people working with different Computers. Also, I did not receive any nightly build link in the email. Can you send me one.

Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
32,052
Location:
Prague, Czechia

Support for the environment variables in the Local directory path has been implemented now.
I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Though for INI file path, it is not implemented. I do not think, it would help you. That path is obviously not stored in the INI file, but in Windows registry. You have to set it manually on each of your machines.

Reply with quote

saud
Donor
saud avatar
Joined:
Posts:
12
Location:
Home

Thank you for implementing environment variables, works perfectly.

The reason I asked for INI path is when installing WinSCP from the Microsoft Store. If I run the portable executable from a folder INI gets the path from that folder, but installing from Store does not. But manually setting the path also works for me. Hopefully I ll see the update in the Windows Store soon.

Reply with quote

Advertisement

You can post new topics in this forum