Windows environment variable for Sync folder location


BogBeast

Recommended Posts

New user here, finally migrating away from other solutions.

I like to store alot of portable apps and files in my sync folders. I also like to create shortcuts that point to them; usually in a folder located in the root of the sync folder.

The sync folder location varies, depending on the machine I have installed, so shortcuts don't usually work very well. To get round it I manually create an environment variable that allows the s/cuts work, eg %resilio%\programs\name.exe rather than a hardcode path.

Would it be possible to sync client to create this variable? I don't think it would be programmatically difficult and I think it would be very useful.

Thanks

Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...
1 hour ago, Andy+ said:

Perhaps an experienced user can also install this manually in the settings.

I wrote powershell script to interrogate the location of the the dropbox and then set a variable.  Trouble is it required additional software installing and configuration to get it to work. I never got to try it with multiple user profiles.

It would seem a lot more efficient to have the client just set a user variable 

Link to comment
Share on other sites

  • 2 months later...

@Alex.  I think the correct location is "%APPDATA%\Resilio Sync"    %APPDATA% includes the "Roaming" directory in my instances.

What I am looking for is not a path to the APPDATA location, but an environmental variable I can reference to find configuration files after the sync occurs. 

==========================================

UseCase: As a user I want to run a script that can quickly find a folder that is being synced.
(1)Sync to computer of interest
(2)Execute a generic script that can quickly find a Synced file for processing.

--- How it works with Microsoft Once Drive---
(1)Loginto OneDrive
(2)Script references %OneDrive%\..\SyncFolder\mySyncedBinary.exe"   OR
                     %OneDriveCommercial%\..\SyncFolder\mySyncedBinary.exe"

Note: could also use %USERPROFILE%\<OneDrive Directory>\ 

--- How it works with Resilio Sync ----
(1) Sync Folder
(2a) Script must be updated to point to the exact location of mySyncedBinary.exe as the synced folder maybe in a different location and this Script is unique to the computer it is being run and and thus can not be commonly synced across Sync'ed folders.

HomePC Location:  d:\someLocationA\SyncFolderA\mySyncedBinary.exe
Laptop Location:  c:\someLocationB\SyncFolderB\mySyncedBinary.exe
ServerPC:         f:\someLocationC\SyncFolderA\mySyncedBinary.exe
                  g:\someLocationD\SyncFolderB\mySyncedBinary.exe
                  
(2b) Need to create an environmental variable for "each" shared folder used.
Example:
HomePC: set SyncFolderA='d:\someLocationA\SyncFolderA\'
Laptop: set SyncFolderB='d:\someLocationB\SyncFolderB\'
ServerPC: set SyncFolderA='f:\someLocationC\SyncFolderA\'
ServerPC: set SyncFolderB='g:\someLocationD\SyncFolderB\'
-----
It would be EXTREMELY helpful if an environmental variable for each Sync'ed folder was automatically created with a consistent name.
----

Note:  This would be helpful if it also did this for linux environments.

@BogBeast, Is this similar to what you were requesting as well?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.