A little python script which checks a folder and subfolders for filenames that are incompatible with Microsoft's OneDrive. It will replace all instances of not allowed characters.
The script also checks for any paths which are longer than 400 characters and shortens them accordingly
Tested with Python 3 on Mac
Download the file "readyforonedrive.py" (or copy the content) to any directory you want on your computer.
Run the command with '''python3 readyforonedrive.py''' Add the folder you want to correct (it will also run through subfolders) Choose dry run (y) or real stuff (n) to get going
Use at your own risk