The best solution to this problem;
- Use FolderToData.ps1 to audit your files and folders to a CSV.
- Load this to Excel
- Change the destination folder names / paths to be acceptable.
- Change the filenames to be acceptable.
- Import folders and files from Excel source - See examples in the documentation
This approach is the best because you can;
- Have full control over what is created in SharePoint.
- Use Excel formula to automate
- Leave source files intact
- Work around limitations
If you are using SourceDataSetType FileSystemFiles illegal characters will be replaced as of DIFS 2.8