Author |
Message |
jacobacci
Joined: 22 Feb 2015 Posts: 22
|
Posted: Sun Nov 18, 2018 5:12 pm Post subject: use variable in file path |
|
|
I am using ViceVersa on various computers. Some point the system Documents path at D:\My Documents\ and some at C:\users\User\Documents.
Is there any way I can use an environment variable in the ViceVersa profile definition to be able to use the same profile in both cases?
I would like to be able to use long pathnames. |
|
Back to top |
|
|
jacobacci
Joined: 22 Feb 2015 Posts: 22
|
Posted: Sun Nov 18, 2018 6:10 pm Post subject: |
|
|
ok, did a bit of digging and got this far:
Using power shell apparently it is possible to get the mydocuments path through the windows API using
[environment]::getfolderpath("mydocuments").
If I could find a way to write this value to an environment variable DOCSPATH, I guess I'd be home. Then I would simply use %DOCSPATH% (or rather <DOCSPATH>) in the sync profile.
Can anyone point me in the right direction how to achieve this?
Thanks a lot |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8763
|
Posted: Mon Nov 19, 2018 12:49 am Post subject: |
|
|
Hi,
Any Windows Environment Variable can be used as a folder variable, but '<' must be used instead of '%'.
For example:
%ALLUSERSPROFILE% becomes <ALLUSERSPROFILE>
%COMPUTERNAME% becomes <COMPUTERNAME>
%HOMEPATH% becomes <HOMEPATH>
%WINDIR% becomes <WINDIR>
etc. _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
|