How to bulk upload/copy a folder structure and files to SharePoint

So you’ve got a bunch of files nicely arranged in a folder structure sitting on your computer or a network drive that you want to copy up to a SharePoint library and preserve the directory structure. On the surface this is a daunting task as you can’t just give SharePoint your folder structure and tell it to do the work for you, so what are your options.

Option 1: Manually via SharePoint IU

Recreate the folder structure in SharePoint and upload the files via SharePoint UI in batches doing a multiple file upload to one destination folder at a time. Not much fun for anyone, but it can be done.

Option 2: Commercial Tool

Try a 3rd party tool. Yes they will probably cost you but will get the job done and probably with a few extra bell’s and whistles like applying metadata to SharePoint columns during the process. Some of the key companies to take a look at would be:

Option 3: Open Source Tools

There are some open source projects going around that claim to handle these types of bulk uploads, here’s a couple that look interesting:

Option 4: Script it Yourself

PowerShell is an awesome way to get things done quickly in SharePoint, I’ve written these scripts in the past that show you how to create folders and how to upload documents to SharePoint. With a bit of extension and effort you could roll your own scripted solution.

Option 5: Explorer View

The old ‘Open Library in Explorer View’ option in SharePoint may get you out of trouble if the directory structure and number of files is fairly small. Simply use the Explorer View to open the SharePoint library up in a Windows Explorer window and then copy/paste or drag/drop into the Window and the magic will start to happen

Option 6: OneDrive for Business

Now this is my preferred option for getting the job done, and the reason for writing this blog post! To achieve this one, browse to your library in SharePoint and click on the sync button to have the SharePoint library sync’d via OneDrive to your local machine.


After the sync has completed the SharePoint library (and it’s content including any folder structure) is now represented as a folder structure that you can easily get to through Windows Explorer.


Now it’s just a matter of copy/paste or drag/drop your local folder structure (that you want to copy to SharePoint) into this folder in Windows Explorer. Here is my folder structure I want to copy up to SharePoint.


So I can just copy the “My Folder Structure” folder and paste it into the SharePoint sync library location. This is super quick because it’s just copying between 2 locations on your local hard drive.


Now the real goodness happens. OneDrive will sync the entire folder structure including any content files up to SharePoint in the background. You will notice that the folders and files you have just pasted have a tiny icon in the left corner. This will display a green tick when the item has been created in SharePoint. This is awesome, your computer is still free to use, there’s no lockup. If you need to shutdown before the sync is finished, it will just pick up from where it left off. OneDrive’s mission in life is to keep your local folder in sync with the SharePoint library, and it will work tirelessly in the background to do this.

Another powerful advantage this method has over many of the other options I provided earlier is that it will work with Office 365 which you just can’t reach some of those other methods.

Now my disclaimer before I get people throwing virtual rotten fruit at me. I’m not suggesting you use this method to move an entire network drive to SharePoint. Yes, I advocate you should take the opportunity to clean up the data on your network drives and not just move the problem to SharePoint. I also believe in the use of metadata to classify content rather than using folders. Having said that, there are valid instances when you do need to perform an upload of many files and preserve the folder structure in SharePoint and I think the OneDrive approach is a pretty cool tool to add to your arsenal.

About Cameron Dwyer

Architect and developer at OnePlace Solutions. Passionate about delivering compelling solutions on the Office 365/SharePoint platform. Addicted to coffee.

Posted on June 4, 2014, in Office 365, PowerShell, SharePoint and tagged , , , , , . Bookmark the permalink. 26 Comments.

  1. Great post Cameron, can I recommend Sharegate as a third party tool as well? It’s especially helpful for this scenario and doesn’t charge by GB transferred.


  2. Hi Cameron, does OneDrive preserve versioning?


    • Hi Darrell,

      Can you elaborate more on the question? Are you trying to bulk upload multiple versions of the same document and end up with one ‘latest’ document in SharePoint with other documents as SharePoint ‘previous versions’ of the document? Thanks.


      • In a Documents Library you can turn on Versioning, which preserves a version of a document each time you edit and save the document. With “minor version” selected, documents will be listed as 1.1, 1.2, 1.3 etc. You can easily revert to an earlier version by clicking on the version number of interest. So it is one document but with a record of previous versions. Will that be preserved when uploaded via OneDrive?


      • Hi Darrell,

        Thanks for clarifying the question.

        If you sync a SharePoint document library (with minor versioning enabled as you have described) then this is the behavior you get:
        – Only the latest version of the file is stored in the local sync’d folder on your machine.
        – When you open, edit, save the file (from your local location) then when a sync happens in the background you changes will go in as a new version.

        I have a SharePoint library with just one Word document in it and it is at version 0.1
        I sync the library using OneDrive
        I open the file from my local sync’d folder
        I make a change to the file and save in Word
        I now go back to SharePoint and take a look at the version history and it’s at 0.2

        I hope this answers your question.


  3. Hi, I would like to suggest a third party tool as well. We’ve had many great responses on this tool and we’re always in for feedback. One of its main features is adding metadata to the documents while migrating.


  4. if you placed permissions on the local folder would they be inherited when sync’d to Sharepoint


    • Hi Vince. I don’t think your local file permissions will sync to SharePoint. Once items have synced to SharePoint you can right click on the folder (local folder that has been synced) and you get a OneDrive | Share… option which really just opens the relevant webpage in SharePoint to allow sharing of the item. SharePoint security cascades down the folder structure, so a solution for you might be to manually create the top level folder in SharePoint and assign correct permissions, then use OneDrive to upload all descendant folder structure.


  5. I’ve built a free tool to migrate folders/files to Sharepoint, it supports Sharepoint 2013, Office 365 and OneDrive🙂

    Liked by 1 person

  6. How can this be done on a mac?


  7. Hi Cameron. Great article! Would you mind adding our file server migration tool, Files To Go, to your list of commercial ones? Files To Go supports migrating to SharePoint Online and also migrating in bulk from users’ home drives to OneDrive for Business. Free trial available from here:

    Thank you!



  8. Hi Cameron,
    I would suggest dms-shuttle ( for uploading folder structures to SharePoint. Bulk editing of metadata is supported too. This is a commercial tool, but there is a free trial version.


  9. I know nothing about SharePoint and have nothing fascinating to add. But THANK YOU. You just saved me hours! I just wanted to copy folders with nothing in them and could not find this anywhere on Microsoft help.


  10. I just found out that your preferred solution doesnt work with PictureLibraries, they cannot be synced. You have a better solution?


  11. I’m attempting to use OneDrive for Business to connect to a new SharePoint Library exactly as you explain and I’m frustrated as it prompts for Credentials and I enter them, but then the screen sits at the Office credentials sign in and does nothing, no errors .. nothing after I click Sign In. if I then click on X to close that screen, OneDrive for Business Error “We can’t connect to the specified SharePoint site” Note: it’s the company admin and Owner of site attempting to sync. I must be missing a step or a Library settings. Note: Windows 10 Laptop


  12. Hello, I’ve attempted to setup the Sync via OneDrive for Business to a new SharePoint library as you describe above, all appears normal except I’m asked to sign in to account to access the library, I go ahead and enter proper account credentials, but then it sits there and does nothing, no errors or prompts. If I hit X to close the office sign in windows (looks exactly the same as the local copy of Office Activation prompt), I get the OneDrive for Business Error “We can’t connect to the specified SharePoint site…. The account is that of the Office 365 admin and the Site Owner/creator and full rights to the Document library. I feel I’m missing something, but not sure what. Any ideas would be appreciated Thank you.


  13. Mike in Cairns

    Hi Cameron. Love your work. Often read your articles and am very impressed. But this time…Umm No mention of the 5,000 file limit – come on!!! No mention that the documents will be checked out if mandatory metadata is not completed??? And i’m really surprised that you didn’t sneak in a mention of the brilliant ‘Send to SharePoint’ on the context menu of OnePlace.

    As a SP consultant, I come across so many companies who just push their entire network file structure up to SP. I think you should make clear the MS limitations and restrictions


    Liked by 1 person

    • Hi Mike, thanks for adding the link to the technical limitations that exists with OneDrive sync, this is very valuable info for anyone looking at the OneDrive sync option. Despite it’s problems the OneDrive sync is still probably one of the best out-of-the-box methods for a user to bulk upload a folder structure to SharePoint. You’re not going to beat a 3rd party product that is designed to do this and give a rich experience around validation and applying metadata on the way up though, so if your requirement can’t be satisfied with the free OneDrive option then unfortunately it’s time for a 3rd party product, or some custom dev/scripts🙂 Thanks for the OnePlace ‘Send to SharePoint’ plug!


  1. Pingback: How to import (upload) an entire folder of files to SharePoint using PowerShell | Cameron Dwyer | SharePoint, Outlook, OnePlaceMail

  2. Pingback: More out-of-the-box ways to get Email into SharePoint (2013 and Office 365) | Cameron Dwyer | SharePoint, Outlook, OnePlaceMail

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: