How to Sync a SharePoint Library to Windows File Explorer with OneDrive Files On-Demand

If your organization has been utilizing SharePoint’s “View in File Explorer” or “Open With Explorer” to map a drive to a SharePoint directory, you may have had problems opening SharePoint files in File Explorer, the connection between SharePoint and the File Explorer breaks, the Mapped Drive disconnects, or the connection is unreliable. Also, SharePoint can be a bit cumbersome when trying to work with files in the web-browser. The outdated SharePoint “View in File Explorer” feature was built with WebDav in the 90’s, and may use ActiveX controls, which is why it relies on Internet Explorer version 10 and/or 11 to run. You may recall we wrote about troubleshooting SharePoint’s “Open in File Explorer” here.

Microsoft’s preferred alternative to “View in File Explorer” is OneDrive Sync, and Files On Demand (FOD.) When we think of “Sync”, we probably think of the classic Windows “Offline Files” configured in the Control Panel’s Sync Center. However, OneDrive Sync is not the same as Offline Files.

OneDrive Sync utilizes the more modern technology, Files-on-Demand (FOD), which is configured in OneDrive Settings. Once configured, Files on Demand will only pull the index of all the files and folders in a SharePoint Library.

If desired, we can get the entire file/folder/data by right-clicking on the file or folder and choosing “Always keep on this device.” By default, if FOD is enabled, and we choose to Sync, we’ll only get an index of the SharePoint Library in the File Explorer (and we won’t sync the entire library and data contained there in.)

How to Enable Files On Demand and Sync a SharePoint Library

Before we Sync our SharePoint Library, make sure the OneDrive app is up to date and is running and logged in with the same credentials used to log into SharePoint online at www.office.com. Look for the blue or white cloud icon in the Systray (bottom right corner of your primary screen; near the clock,) then right-click, and click Settings.

OneDrive Settings

Next, in the Settings dialog box, near the bottom, place a check mark in the Files On-Demand / “Save space and download files as you use them” checkbox.

OneDrive Settings Files On-Demand

Next, open the Edge web browser and sign into www.office.com. Click on the SharePoint icon and then navigate to a Document Library that you would like to sync. Next, click the Sync button at the top of the Library:

OneDrive Sync

Normally we’ll see a couple pop-ups: Getting Ready to Sync, and You are Now Syncing:

Getting Ready to Sync dialog
OneDrive You are now syncing dialog

We’ll now have the SharePoint Library’s index built in our File Explorer with the files now having a status of either “Cloud Icon” or “Green Check Mark” next to each folder/file. As the Sync runs, we can check the Sync status by right-clicking on the OneDrive icon in the Systray.

If you attempt to sync a library that already has a shortcut pointing to that library from within the user’s OneDrive folder, you may get an error:

Sorry, we can’t sync this folder – You’ve already syncing a shortcut to a folder from this shared library.

OneDrive Sharpoint Sync Error

So what the error means is just that. Look in the user’s OneDrive folder in the file explorer and look for a folder/file that has a link icon (screenshot below). Special thanks to Hans Bender blog for pointing this out: https://hansbrender.com/2020/10/07/onedrive-for-business-add-to-onedrive-problems/

OneDrive Shortcut to Library

The icon will appear to have a link, so right-click on the folder that’s pointing to the Library you’re trying to Sync, and choose remove shortcut. Now we should be able to Sync the library.

If we want to have the file in SharePoint downloaded completely to our computer, right-click and choose “Always keep on this device.”

We probably do not want “Always keep on Device” for the entire Folder/Library, as it will eat up our entire hard drive.

Always keep on this device OneDrive Sync

If a file or folder is inadvertently kept on our device, we can right-click and instead choose “Free up space” on the file (greyed-out in the screenshot above.)

Take note in the screenshot above, the newly-synced Shared Library is not directly under OneDrive in the left navigation pane of the File Explorer, instead, it is listed separately below it and has a different “building” type icon.

So now we can use Word and Excel apps to browse our local computer for files that are synced with SharePoint without having to use the old “Open/View in File Explorer” method.

For example, if we want to open a SharePoint file inside Excel, we click the File menu > Open > Browse > Organization / Library > File.xlsx > Open

Open SharePoint Library Files in Excel

Once we have made our changes and click Save, we’ll see a green checkmark under the Status column inside the File Explorer.

Excel File SharePoint Sync Status

We hope that if you’ve experienced difficulty opening SharePoint files in the Windows 10 File explorer, this procedure and OneDrive Sync will provide a more stable and fluid means of browsing SharePoint files in the File Explorer.

Solved – cannot open www.office.com with Internet Explorer – SharePoint Online redirects to Edge

So recently Windows 10 has enabled a security feature that redirects certain websites like www.office.com to the Edge browser. If you need to get into a website using Internet Explorer, for now the workaround is to disable the Edge redirect setting inside the Edge browser settings.

If you use SharePoint online a lot you have probably found that Open in File Explorer is a convenient way to manage your SharePoint files and libraries in Windows 10. You’ve also probably found that in order to view the SharePoint files in the Windows 10 File Explorer, you first need to open Internet Explorer, then open the SharePoint library, find the link Return to Classic SharePoint in the bottom left corner of the SharePoint library page, and then click on the Open in File Explorer link inside Classic Mode. Details on how to troubleshoot opening SharePoint files in File Explorer can be found here. If you want an alternative way to browse SharePoint files in Windows 10 File Explorer using Edge, please go here.

If you want to know how to disable or remove the IE to Edge redirect, use the following instructions:

Start by opening the Edge browser.

In Edge, click on the ellipsis menu in the upper-right corner, and then click Settings. Or in the address bar at the top of Edge, type edge://settings/defaultbrowser and press Enter.

Edge Browser Settings

Next, inside the Edge Settings page, on the left side menu, click Default browser.

Change the setting “Let Internet Explorer open sites in Microsoft Edge” to Never.

Edge Default Browser Let Internet Explorer open sites in Microsoft Edge

That should do it!

Close the Settings Tab/Edge browser. Close and then open Internet Explorer browser. Go to www.office.com in IE and it should let you in.

Solved – Cannot move files in SharePoint Online Office 365 from one folder to another folder

When attempting to move files in SharePoint Online Office365 from one folder to another you may find that you get errors or the moving process times out or fails with the error:

Error: We couldn't move the file because it's locked for editing or has been modified or deleted.

What has happened is some of the files in these folders have been marked as “checked out” or “locked”. This may have been done erroneously by a user or the status was corrupted when the files were originally uploaded into SharePoint.

Once the files are checked in, you can move them. As an alternative to moving the files, you may also be able to “Copy To…”, and then delete the original files. Again, you may not be able to delete the files you copied because the files you want to delete in SharePoint may also be locked or checked-out.

This is what worked for me:

  1. Use your favorite web browser and log into your SharePoint site (e.g. https://companyname.sharepoint.com/sites/sitename.
  2. Browse to the problem folders that contain files that you cannot move to another folder.
  3. In the folders, you should find files that are “checked out”. The files will have a green arrow icon next to the file icon.  
  4. Place a checkmark next to the file that is checked out.
  5. In the menu at the top-right choose “…”
  6. In the “…” menu, click “Discard check out”
  7. Now try moving the file with the following sequence:
  8. If the problem files are Word/Excel files, you may need to Open the files in Word or Excel first, in order to check them back in.