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
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 Usturoiu
Oct 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!)
- PlabrieDec 31, 2018Copper Contributor
I have created junctions in the OneDrive folder. Though the status indicator seems problematic, the files are actually updated in OneDrive automatically. I opened a Word document located in the junction folder, modified and saved it. It was immediately saved to OneDrive. So as long as OneDrive is up and running we can assume it works fine for junction folders.
- cafeineJun 07, 2019Copper Contributor
Plabrie
You can also use symbolic links to have external folders sync to OneDrive.Check my open source free app that you can use to create symbolic links with UI and trick OneDrive to include linked folders on the sync.
https://github.com/ktheod/OneDriveBully
If you have issues with it (hopefully not) you can contact me on Facebook here: https://www.facebook.com/pg/OneDriveBully
- Muthu VellayanJul 22, 2018Copper Contributor
MSFT, please listen. Please allow us to list directories to backup. Simple.
Forcing us to play tricks -- links (broken), management software, etc. is a huge waste of your customer's time and error-prone. I don't understand how you miss these common use cases and don't hear your customer's painful requests. This forces tech guys to develop vulnerable utilities and others to just move to dropbox/googledrive, etc.
Please fix/respond. Thanks.
- Paul StorkJul 23, 2018MVP
I think the fundamental problem here is that this thread wants to use OneDrive for Business as a Backup product rather than a productivity tool. Its not meant to be a backup solution. If you want to backup your files then go get a product that is designed to do that. If you want to sync directories of files so that you can work on them from online and in multiple places, then that is what OneDrive for Business is designed for. With the recent announcement of the redirection of Known Folders this gets even better. But I doubt you will ever see MS design OneDrive sync to allow backing up of random directories wherever they happen to be. Its not what it was designed for.
- 哲 李Apr 02, 2018Copper Contributor
Matt Storr wrote:
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.
- Actually it have not worked properly. Because Windows doesn't propagate file system events to both ends of the symlink, just the original end. If you use symlinks or junctions, the OneDrive client cannot get to hear about changes promptly. The OneDrive client maybe check for changes after certain minutes. So it is seemingly syncing for everything. Maybe MS just doesn't care about that thing as MS has introduced OneDrive REST API to developers.
Matt Storr wrote:
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!)
Here are three tools
- If you just want to use OneDrive client, maybe you can try this tool. It can create symlinks or junctions and trigger OneDrive to sync, including those folders on a timer you set. Here is the link: OneDriveBully. But it hasn't update for half a year.
- And this tool may be suitable for you. It creates a sync relationship between a OneDrive folder and a local folder. This project has not stopped yet, and it has a wonderful GUI. Here is the link: SyncPro
- The last I want to introduce is rclone. It is a big open source project as it has 8k+ stars. But it is only a backend. It requires you having a certain computer basics. There is a GUI frontend called RcloneBrowser which seems to be helpful although it hasn't update for half a year.
- cafeineNov 20, 2018Copper Contributor
Hi 哲 李 , I am the developer of OneDrive Bully and thanks for mentioning my small app in a forum like this, I am really honoured. I developed the tool for the same need as everybody else in this forum and I have been using it without an issue to sync my work & home laptops for a year now without issues.
The code hasn't been updated since then as there weren't any issues reported on GitHub or on the FB Page. Feel free to try it and if you see anything missing/misbehaving please open an issue on GitHub or send me a pm on FB and I will have a look at it.
Thanks