Skip to content
Contact us

Migrate a list of files from a CSV file

One list, many sources

A single CSV file can name files from SharePoint sites, Teams, OneDrives and file shares together. Each file is read from wherever it lives.

Exactly the files you chose

Nothing is scanned: the job takes the files on the list, one by one, and leaves everything else where it is.

One destination

Every file lands in the destination you choose — a Nextcloud Team Folder or a user's files — in the folders it had at its source.

Most jobs read one source location: a library, a OneDrive or a share. A File List CSV job is for the cases where the selection, not the location, is the point:

  • Files picked after discovery. Discovery and the Power BI reports show what is there; filter the files down to what should move — a project, a customer, a retention class, everything changed since a date — and migrate just those.
  • Files spread over many sources. One list gathers documents from several sites, OneDrives and shares into one Team Folder, without a job per source.
  • A second pass. Bring over the files a first migration left out, or the ones a business owner asked for afterwards, without running the whole source again.
  • A list from another system. Any system that can write a CSV file — a records system, a spreadsheet, a script — can say which files to migrate.

The selection is in the CSV file

The file selection is defined by the list, not by a single source location. The job has no Source URL of a library, no UNC path and no OneDrive user of its own: each line of the list says where its file is.

A list, or a query

A File List CSV is a selection fixed when it is exported. Where the selection should follow the documents — the files that match a criterion today, every time the job runs — a Dynamic BI data query job takes it straight from the BI data, with no export and no row limit. It is under development.

See Pick files with a Power BI or SQL query

  1. Pick the files and export them to CSV

    In the Files report in Power BI, narrow the File details table down to the files you want, and export it to a CSV file — or write the CSV file in any other system.

  2. Put the CSV file in Nextcloud Files

    Upload it to any folder in Nextcloud Files. The app reads it from there; nothing is uploaded to the app itself.

  3. Create a migration job with `Source Type` `File List CSV`

    In the job dialog, choose Test Migration or Migration as the mode, set Source Type to File List CSV and give the CSV file's link in File List Link — Choose file picks it, or uploads it, for you.

  4. Choose the destination

    A Nextcloud Team Folder or a Nextcloud user, and optionally a folder inside it, as for any migration.

  5. Set the job to Ready

    SMART Migration claims the job, reads the list from the app, and migrates each file on it.

The list is a CSV file with commas or semicolons between the columns — whichever its first line holds more of, so a file saved by a spreadsheet in any language is read as it is. Its first line holds the column headings; the job reads the columns by their headings, in any order and in any case — a colon after a heading, as in Name:, is read past — and leaves every other column alone — so an export with many columns works as it is.

ColumnNeededWhat it holds
NameAlwaysThe file's name, such as Budget 2026.xlsx — or, on a line without a Path, the file's full address
PathOptionalThe folder the file is in: a SharePoint or OneDrive URL, or a UNC path or a drive of the SMART Migration server, such as \\FS01\Finance\2026

With a Path

Path and Name are joined into the file's address, with the one separator its kind takes — / in a URL, \ in a UNC or drive path — whether or not Path ends with one. \\FS01\Finance\2026 and Budget 2026.xlsx make \\FS01\Finance\2026\Budget 2026.xlsx

With Name alone

Name is the file's full URL, UNC path or drive path, such as https://contoso.sharepoint.com/sites/Finance/Shared Documents/Budget 2026.xlsx, \\FS01\Finance\2026\Budget 2026.xlsx or c:\myfolder\my file.txt

Space before and after a value is left out, and so are blank lines. Another column may hold text in quotes over several lines; it is read as one cell. A list with headings and no files under them is a list of nothing, not a mistake.

What the check turns down

A file without a Name heading — or with its columns separated by anything but commas or semicolons — a line with no Name, a Path that is not a folder, a Name under a Path that is not a file's name (a whole address, or one of : * ? " < > | in it), and a file address that is not valid: a URL needs http:// or https://, a host, at least one folder — the library — and the file, so a Path of a host alone such as https://contoso is turned down; a UNC path a server, a share and the file; a drive path a drive letter and the file, such as c:\myfolder\my file.txt — and none of them a character Windows refuses in a name. The job does not validate, and cannot be set to Ready, until the file is put right.

Open the Files report in Power BI and narrow the File details table to exactly the files you want, with the page's slicers and filters: by site, library, owner, file type, size, age or any other column the report offers.

Then export those rows with the standard Power BI export in the top-right corner of the table: More options (…) → Export data → a CSV file.

Tip: at most 30,000 files per Power BI export

Power BI exports at most 30,000 rows to one CSV file, in Power BI Desktop and in the Power BI service alike, and leaves the rest out. Keep each selection below that — one site, one library or one owner at a time — and give each part a File List CSV job of its own, in the same group. When the job dialog says Found: … listing 30000 files, the list has almost certainly been cut.

Step by step, in Power BI Desktop and in the Power BI service, with the ways round the limit: Export a file list from Power BI

What the exported CSV file holds

Each line is one file, with its Name and its Path at the source among the table's other columns. One file can hold files from SharePoint, OneDrive and file share sources together. Power BI exports with commas between the columns; a file saved with semicolons is read just as well.

The report is built from what Discovery and earlier runs found, so run Discovery on the sources first if the files you want are not in the report yet. See Discovery and Business intelligence with Power BI

The CSV file does not have to come from Power BI. Any system — a records system, a spreadsheet, a script — can write it, as long as it has a Name column, with a Path column or full paths in Name, and commas or semicolons between the columns. A spreadsheet saved in a language that writes decimals with a comma saves with semicolons: that works as it is.

Section titled “Step 2 — Put the CSV file in Nextcloud and link it to the job”

Upload the CSV file to Nextcloud Files — any folder, in your own files or a Team Folder. Then, on the Source step of the job dialog:

  • Set Source Type to File List CSV.
  • Click Choose file and pick the CSV file — or upload it from your computer in the same window, by Upload file or by dropping it there. Its internal link is put in File List Link
  • Or start a new list there: Create new CSV file here makes FileList01.csv — or the next free number — in the folder on screen, with the one column heading Name, and links it to the job. Open it with Open file, add the files one per line as their full URL, UNC path or drive path, save, and use Refresh preview.
  • Or paste the link yourself: open the file's Share menu in Files and copy its internal link, such as https://cloud.example.com/f/12345

The dialog then checks the file and shows what it found:

The dialog showsWhat it means
File: and the folder and file nameWhere the link leads in Nextcloud Files — click the folder to open it
Found: … listing n filesThe file is a CSV file, and n lines under its headings each name a file
Preview: the first … linesThe file's first lines as the check read them, Name and Path first, then the other columns — a cell the check turns down is marked
A message in redWhat is wrong: no file at the link, a folder, not a CSV file, no Name column, no files listed, or the first line with a missing Name, a Name that is not a file name or a Path that is not a folder, with how many lines have a problem — the cell at fault is marked in the preview

Changing the list

Edit the file, or replace it in Nextcloud Files under the same name: the link stays the same, and the next run reads the new list. Open file opens it in a new browser tab; after saving it there, Refresh preview reads it again in the dialog.

In the Jobs table and on the job's summary card, the job's source is the list's place in Nextcloud Files, such as /Reports/FileList01.csv — not its link — so you can see which list each job reads. A link that leads to no file is shown as it is.

  • Include Subfolders and Include empty folders are not offered: a list names each file itself, so there are no folders to walk into and none to recreate empty.
  • Include Version History and Version History Scope apply to the files that keep versions — those from SharePoint and OneDrive.
  • A File List CSV job is a Test Migration — which checks the listed files without writing anything — or a Migration, which copies them. It is not offered for Discovery: the list is what a discovery gives you to pick from, not something to discover. A Discovery job does not show the choice, and a File List CSV job switched to Discovery afterwards does not validate.

See Sources and Jobs and job modes

How the folder structure is recreated at the destination

Section titled “How the folder structure is recreated at the destination”

When the list has a Relative Path column — the Power BI File details export does: the path of the file relative to the starting point of the source scan that found it — each file's folders at the destination are rebuilt from it. Files then keep their folder layout at the destination even though they were gathered from different sources.

Files with the same relative path

Two files from different sources with the same Relative Path and name would land in the same place at the destination. Check the list for such pairs before the job runs, or split it into two jobs with a Destination Folder each.

See Destinations and Rules for adding and overwriting files

When SMART Migration claims a File List CSV job, the app reads the list again and checks every line, so a mistake made after the job was saved is found before anything runs.

  1. The list is kept

    The CSV file is copied into the run's folder in SMART Migration Reports, as it stood at that moment. Years later, the run still shows exactly which files it was asked to migrate, even when the list in Files has been changed since.

  2. The list is split by where the files are

    Two files are written beside it: csv_url.csv with the SharePoint and OneDrive files, and csv_unc.csv with the file share and drive paths. Each has one column, Name, holding every file's full address — Path and Name joined — with TAB as the separator, whatever the list used. A file is only written when the list has files of its kind.

  3. SMART Migration gets the links

    The claim hands SMART Migration the job with Nextcloud's internal links to those two files, and SMART Migration migrates the files they name.

A list with a mistake ends the run in Error

When the file is gone or fails the check, the job is not handed to SMART Migration. Its run ends at once with the result Error and a message saying what is wrong — the line and the value, or the missing column — which Run History and the job's tooltip show. Put the file right in Files, then set the job to Ready again.

See Reports and run folders in Nextcloud Files and Run History

SMART Migration can also read the list itself through the app — GET /api/v1/jobs/{id}/file-list — so the account it uses needs no access of its own to the folder the CSV file is in.

See also