How to copy a shared network directory to sharepoint online

Welcome Forums General PowerShell Q&A How to copy a shared network directory to sharepoint online

Viewing 2 reply threads
  • Author
    • #196718
      Topics: 4
      Replies: 5
      Points: 62
      Rank: Member

      I want to copy an entire network directory to SharePoint online and I all I can seem to capture so far are the main folders and files in the directory.  Any sub-folders or files withing the main folders are not carrying over as intended (The main folders are empty).  My code is below and any assistance is greatly appreciated.


    • #197120
      Topics: 14
      Replies: 44
      Points: 155
      Helping Hand
      Rank: Participant


      I’ve never done this sort of thing with PowerShell, but I’ve got some questions.

      1) Is PowerShell the right tool? Doesn’t MSFT have a pretty good SharePoint migration tool that you can just point to a directory and it will upload?

      2) If PowerShell is a requirement for this – I don’t see anywhere in the code you posted where


      has any values assigned? In addition, when you do your

      – why are you not using the



    • #197228
      Topics: 7
      Replies: 121
      Points: 587
      Helping Hand
      Rank: Major Contributor

      You may also want to consider a simple RoboCopy. I have done many of these to SharePoint Document Libraries. WebDAV is required to access the SP list, but is typically enabled by default so you should be good to go. RoboCopy will handle your recursion, and if need to do this on a continual basis, robo only copies changed files, not all of them so successive copies will go much faster.

Viewing 2 reply threads
  • The topic ‘How to copy a shared network directory to sharepoint online’ is closed to new replies.