Hi @mike1648.
This problem might be caused by Arduino IDE being configured to use that location for your "sketchbook" folder. If so, the solution will be to change the location in the IDE preferences:
- Select File > Preferences from the Arduino IDE menus.
The "Preferences" dialog will open. - Check the path that is configured in the "Sketchbook location" preference in the "Preferences" dialog.
If it is set to a path under the OneDrive folder, change the preference to any other convenient location on your computer. - Click the "OK" button in the "Preferences" dialog.
- Move any files of value from the OneDrive folder.
Any Arduino files can be moved to the new sketchbook location. - Delete the OneDrive folder.
After that, the OneDrive folder should no longer be recreated by Arduino IDE.