Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Migrate File Shares to SharePoint (Bulk CSV with SPMT)

Say you’re moving two department shares, a 6-file Policies folder and a 4-file Marketing share, into one SharePoint library. Put both in a CSV file and let the SharePoint Migration Tool run them together.

In this tutorial, we’ll migrate file shares to SharePoint in bulk: plan the move, build the CSV (or JSON) file, run it in SPMT, check what landed where, and see when Migration Manager fits better.

The sample file shares we’ll use

Both shares go to the Migration Demo library on /sites/SPGuides. If you still need a target, first create a document library in SharePoint Online. See the SharePoint tutorials hub too.

Source shareContentsTarget folder
SPGuides PoliciesHR (3 files), Finance (2 files), Company Holidays 2026.docx = 6 filesMigration Demo/Policies
Marketing ShareCampaigns (3 files), Brand Assets (1 file) = 4 filesMigration Demo/Marketing

For one folder, the SPMT wizard is enough: Single file share source, pick the folder, site and library, then Start. My post How to Use the SharePoint Migration Tool (SPMT) Step by Step covers every screen.

Plan the file share move first

Before you write the CSV, plan these:

Then check the limits that trip up old file servers:

LimitWhat Microsoft documents
Path lengthThe full decoded path, including the file name, can’t exceed 400 characters
Invalid characters" * : < > ? / \ |, plus leading or trailing spaces
Blocked names.lock, CON, PRN, AUX, NUL, COM0-COM9, LPT0-LPT9, desktop.ini, _vti_, names starting with ~$
File size250 GB per file

Pro Tip: Turn on Replace invalid filename characters in SPMT settings. With it off, those files are skipped, and a package with more than 100 errors gets blocked.

Method 1: Bulk migration with a CSV file (Recommended)

Use this for more than one share. Each row is one task, with no header row. Here’s the file I ran:

C:\Shares\SPGuides Policies,,,https://yourtenant.sharepoint.com/sites/SPGuides,Migration Demo,Policies
C:\Shares\Marketing Share,,,https://yourtenant.sharepoint.com/sites/SPGuides,Migration Demo,Marketing

How does this work?

#ColumnFor a file share
1SourceRequired: the folder path
2Source DocLibLeave empty
3Source SubFolderLeave empty
4Target WebRequired: the site URL
5Target DocLibRequired: the library name, here Migration Demo
6Target SubFolderOptional: empty means the library root

That’s why three commas follow the path. Microsoft Learn’s format page actually lists 8 columns (the last two are hub site columns for SharePoint site migrations) and says all columns must be present. My 6-column file worked in SPMT 4.3.130.12, but to match the documented format, add two empty trailing commas:

C:\Shares\SPGuides Policies,,,https://yourtenant.sharepoint.com/sites/SPGuides,Migration Demo,Policies,,

Now run it. In SPMT, select File share > Add new migration and choose Bulk migration using JSON or CSV file.

SPMT Select a method screen with Bulk migration using JSON or CSV file highlighted

Enter the CSV path in File path.

SPMT Bulk migration page with the path to spmt-bulk-migration.csv and the View sample link

Review migration lists one row per task:

SPMT Review migration screen listing two file share tasks from the CSV file

Select Next, then Start. Both tasks ran in parallel.

SPMT progress page with both bulk migration tasks running in parallel

After about 1 minute, the Migration complete dialog showed 10 out of 10 items and 296.20 KB out of 296.20 KB.

SPMT Migration complete dialog showing 10 of 10 items and 296.20 KB migrated

Per task, Policies moved 6 of 6 items (183.99 KB) and Marketing 4 of 4 (112.21 KB).

SPMT per-task results with 6 of 6 and 4 of 4 items migrated

So here’s the catch: with a target subfolder, the source folder’s contents land in it. I got Policies/HR, not Policies/SPGuides Policies/HR.

Method 2: Use a JSON file instead

JSON suits task lists built by a script. Here’s the first task in Microsoft’s format:

{
  "Tasks": [
    {
      "SourcePath": "C:\\Shares\\SPGuides Policies",
      "TargetPath": "https://yourtenant.sharepoint.com/sites/SPGuides",
      "TargetList": "Migration Demo",
      "TargetListRelativePath": "Policies"
    }
  ]
}

How does this work?

Only SourcePath and TargetPath are required; TargetListRelativePath is the subfolder.

Check the results

File share > View migrations showed both as Completed.

SPMT File share migrations list with two Completed migrations

View reports opens a WF_ folder with Log and Report subfolders. Compare file counts in the library and check site permissions in SharePoint Online. To reorganize later, move folders in SharePoint Online.

Which method should you use?

SituationUse
One folder, one-time moveSPMT single file share source
A few shares from one PC or serverSPMT bulk CSV
Task list built by a scriptSPMT bulk JSON
Many file servers, large volume, central trackingMigration Manager

Migration Manager lives in the SharePoint admin center and sends tasks to agents on several servers. It needs SharePoint admin rights and SMB 2.0+ sources. Moving home drives? Read the difference between SharePoint and OneDrive first.

Things to Keep in Mind

  • CSV picked as a folder: a CSV path under Single file share source shows the error below. Choose the bulk option instead.
  • Header row: don’t add one; every line is a task.
  • Throttling: run big batches on evenings or weekends.
  • Library design: follow these document library best practices.
SPMT Select a source error This folder does not exist or cannot be opened for a CSV path

Once the files are in SharePoint, these guides help you organize and secure them:

Frequently Asked Questions

Does the SPMT CSV file need a header row?

No. Every line is read as a task, one source and destination per row.

Can I migrate file share permissions with SPMT?

Yes. Turn on Preserve file share permissions.

Why did my files land without the source folder name?

With a target subfolder, SPMT copies the folder’s contents into it. Leave it empty for the library root.

Where is Microsoft’s CSV and JSON format documented?

When should I use Migration Manager instead of SPMT?

For many file servers with agents and central reporting. See Migrate your file shares with Migration Manager.