Hi everyone !

Today I wanted to share a small tip if you migrate some file share to sharepoint online as it's a essential part to migrate full cloud.

In the migration wizard as seen here; you could hit some warning that some files use incorrect filenames.

image-7.png?w=667

image-2.png?w=826

The migration wizard got some file that it does not like, aka;

Thumb.db's file or temporary Office's file, ~\$'s file prefix.

The command issued for your file share; Get-ChildItem -Path '\\server\path' -Filter '~\$*' -Recurse would give you a good idea what it can find.

A dir /s like that would work too;

image.png?w=97

If you download the analyse's log you will get log entries with that error code;

image-5.png?w=215

An easy fix if you don't want to migrate those filename is to replace in batch; like that way;

image-4.png?w=792

Get-ChildItem -Path 'z:\' -Filter '~\$*' -Recurse | Rename-Item -NewName { \$_.Name -replace '~\$', ' ' }

The option are too cna help in the batch migration advanced's option;

image-6.png?w=580

Some good information for regex in case you have other files that need updating in batch;

https://megamorf.gitlab.io/cheat-sheets/powershell-regex/

http://regexstorm.net/tester

Thanks everyone

Next Post Previous Post