A good thing to know about Sharegate when doing migrations of file share data into SharePoint is that Sharegate will not import files with the file attributes of hidden or system. This is generally a good thing because these hidden files may include things like temporary files associated with Office documents. If you would like to generate a report of these files it is easy enough to do with a single statement in a cmd prompt. This is often helpful to illustrate why we would not want to try to import these files and why the file count you see in windows explorer is different than the item count in SharePoint when the migration is complete.
This is an example of the statement. To run this in windows you can enter cmd or search for the command prompt program and then format you statement.
dir "x:\My Directory" /s /A:H > "c:\projects\hidden_files_report_for_x_my_directory.txt"
Where “x:\My Directory” is the directory you would like to search for hidden files. /s tells us to look through any subfolders as well. the /A:H indicates we should look for files that have an attribute of hidden. And the last part of the statement after the > character is the name of the file you would like to write the report to.
In my experience files with the system attribute also have the hidden attribute, so it’s generally only necessary to report on hidden files. If you wanted to look for any system files that are not hidden you could repeat the command with the following /A:S-H (meaning give me the system files that are not also hidden).
Also note if you’re trying to do something like this in PowerShell, that the Get-ChildItem cmdlet will throw an error on a file larger than 260 characters. This limit is not found on the dir in a command prompt, so that’s why we can use it to track down all those sneaky hidden files.
Sharegate – SharePoint Migration