SOLVED

Include files in OneDrive sync without copying them

Brass Contributor

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 files and folders scattered around the computer, so they can be backed up, but without copying them to the OneDrive sync folder. This is pretty fundamental, as when they are copied, they are duplicated, and document versioning issues again come to the fore.

 

This must be the most basic of features that doens't appear to be offered with the OneDrive client. I, and most of my customers, need this functionality and I don't see any way to enable it or to apply a workaround. If this has already been discussed, or if indeed I can achieve this, please let me know.

 

Appreciate the help!

31 Replies

Does selective sync help with this and then we will also have the On-Demand sync coming out for Windows 10?

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?

best response confirmed by John Marshall (Brass Contributor)
Solution

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...

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/

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!)

Thanks Matt for posting here! This explains why my backup solution based on Onedrive and symlinks doesn't work anymore and I can stop spending lot of time troubleshoot my setup. I have really come to like Microsoft progress with Office365 and I started to subscribe to OneDrive just because the symlink solution. Bad Microsoft!
Hope someone can post here if there is any progress found of any kind..

@Matt Storr

Try with HardLinks: they appear to work.

Let us know.

@Salvatore Biscari

In my case I want to create a link in my onedrive folder that refers to a folder on another drive. When I try to create a hard link I get the error message: "The system cannot move the file to a different disk drive". :(

 

 

Yes, hard links are in practice aliases, so they don't work on different disks...


@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

  1. 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.
  2. 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
  3. 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.

I have the opposite problem.  I want to make sure large files and unused files (archives and pictures) do not get sync'ed so I am using a symlink.  It seems to work, but if anyone finds that it doesn't under certain situations please let me know.

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?

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...

MSFT, please listen.  Please allow us to list directories to backup.  Simple. 

 

Forcing us to play tricks -- links, 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.

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.

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.

My problem is similar I have a company phone and all pictures need to be uploaded automatically. I have the phone updating to my Onedrive personal account with camera roll without a problem, but I actually need them in my Onedrive business account. I've tried using a junction from the personal to business drive but it doesn't seem to work as others have stated. The only work around I see is to create a task that copies them over every say 10 minutes.  Does anyone have a simpler solution?

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

1 best response

Accepted Solutions
best response confirmed by John Marshall (Brass Contributor)
Solution

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...

View solution in original post