​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


How to automatically rename a lot of folders and files?

I'm trying to upload / copy thousands of folders and files to OneDrive (as a backup).


Unfortunately my naming convention is proving a problem for OneDrive and I am getting 100s of error notifications, saying that items can not be uploaded. A lot of my folders start with a space. And OneDrive can't deal with that:



Is there a way I can automatically rename thousands of folders and files, so that I can replace the space with say a hyphen (to keep the files at the top of Finder windows when sorted by name).


And then search and replace files with any of the other offending characters?

MacBook Pro 15″, macOS 11.6

Posted on Feb 24, 2022 11:57 AM

Similar questions

3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to automatically rename a lot of folders and files?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.