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:
41,276
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.

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

Advertisement

saud
Donor
saud avatar
Joined:
Posts:
13
Location:
Earth

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 %OneDrive%\WinScp.ini so that I can have same settings across all my computers.

Can someone confirm this bug?

C1kHvna.png

Reply with quote

Advertisement

saud
Donor
saud avatar

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:
41,276
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:
13
Location:
Earth

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