Forum Discussion
John Marshall
May 31, 2017Brass Contributor
Include files in OneDrive sync without copying them
Hi, This may be something already discussed and seems to be in the User Voice forums. I'd like to know if there is a way to include existing folders or files, similar to folder redirection, for f...
- May 31, 2017
Hi John.
This feature is not available natively at the moment, but luckily there is a very effective workaround (if you are using NTFS as the local file system).
You should simply create in the local sync folder a symbolic link to the folder that you want to sync (which is located elsewhere) and such folder will sync as if it were a regular subfolder of the local sync folder (it can even be selectively synced...).
You can create symbolic links using the command line or by a wonderful utility called Link Shell Extension.
Hope it helps...
John Marshall
May 31, 2017Brass Contributor
Hi Cian,
I get what you're saying with Selective Sync, however that would apply, as I understand, to files already within the sync folder or files that or in the cloud already that I may or not want to sync.
My requirement is to sync files outwith the sync folder, and without having to move them into it in order to sync them.
On-demanc Sync is something new to me. I just did a quick search and seems to be related to working with cloud-based files on or offline, when required and is more a space-related them.
To sum up, what I'm looking for would allow my to sync a given file or folder without having to move it, or duplicate it, so that it ends up in the OneDrive Sync folder. I guess maybe it would be a right click option over the file in File Explorer to enable it's synchronization with OneDrive. Is this something we already have and maybe I need to enable?
Salvatore Biscari
May 31, 2017Silver Contributor
Hi John.
This feature is not available natively at the moment, but luckily there is a very effective workaround (if you are using NTFS as the local file system).
You should simply create in the local sync folder a symbolic link to the folder that you want to sync (which is located elsewhere) and such folder will sync as if it were a regular subfolder of the local sync folder (it can even be selectively synced...).
You can create symbolic links using the command line or by a wonderful utility called Link Shell Extension.
Hope it helps...
- DeletedJun 19, 2018
Which way should the links point? Do I have to move the folder to one drive and then link back to where I want it to be, or can I just create the link folder in my one drive directory and point it to my original folder?
- Salvatore BiscariJun 19, 2018Silver Contributor
It used to work in both ways, but now I have heard reports that the first method does not work anymore.
Anyway, the second one works perfectly - actually I always use it in this way - so, create the folder inside your OneDrive folder and then drop a symbolic link to it elsewhere.
Hope it helps...
- bassProulxOct 29, 2020Copper Contributor
It seems Salvatore Biscari is right.
At least for me with window10 and OneDrive for Business:
Symbolic link pointing to the OneDrive folder that sits on a different disk --> same issue as above, i.e. takes a lot of time to sync on the cloud when I make changes to a file (pretty quick for a new file though) and sync icon always suggesting it is currently synced even when the sync is complete.
Symbolic link in OneDrive folder pointing to a folder on another disk --> new files and changes to a file sync instantly and icon shows the appropriate state.
Thanks for the "under-appreciated" insight Salvatore Biscari---edit---
dang, I just realized that this solution puts the files on the same disk as the one on which the OneDrive folder sites. This is exactly what I am trying to avoid by creating symbolic links.
Problem not solved 😞
- John MarshallMay 31, 2017Brass Contributor
Terrific, thanks a lot for that. I did it via command line using the information in this link: https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
- Florin UsturoiuOct 13, 2017Copper Contributor
thanks
- Matt StorrJan 17, 2018Brass Contributor
I'm posting this here in case anyone else stumbles upon this answer and thinks symlinks/junctions is the solution.
Unfortunately, this doesn't work. Although you can make junction or symlinks between folders, OneDrive will not automatically sync them and the files/folders status indicator will (most of the time) stay in the 'to be synced' state, giving you the impression that its not been uploaded/synced when in reality it has. The only way to force a sync is to pause/un-pause the application, but the status indicators wont change so you still wont know if something has/has not been synced without checking it. Self defeating. Way to go......
It seems MS have half-hardheartedly removed this very useful and glaring missing functionality from the OneDrive application. It used to work with no issues at all, but instead of MS being up-front and obvious with a statement to say symlinks/junctions are not supported (and show this in the sync log), they've behind the scenes broken it so now we are left with files in disparate locations that we're just not sure are being synced any longer.
The only valid way to work with OneDrive is to copy the files into the OneDrive folder. If you want to backup data from other locations, sorry, but MS dont want you to. If they did, they would either a) make 'out of folder' synchronisation possible or b) allow symlinks/junctions to be used (as they used to work!)