Change OneDrive Folder Location or Name on MacOS

Whether you are looking to run multiple OneDrive folders from a single Office365 Tennant or simply wish to rename or relocate your OneDrive folder (for easier identification) on your Mac, these steps should help you out!

First up, you need to have OneDrive already installed and (I suggest) completed a full Sync. If you are unsure of what you are doing, I *strongly* suggest you also make a backup of your OneDrive folder, just in case something goes wrong! After that, follow the steps below:

  1. Exit OneDrive by right-clicking on it in the MenuBar:
Right Clicking on OneDrive MenuBar item and pointing to select 'Quit OneDrive'
Right Click and Select ‘Quit OneDrive’

2. Open up a Terminal (I personally use iTerm, but you can use OSX’s Built In Terminal instead if you prefer

3. Run the following command replacing YOURUSERNAME with the username your profile directory resides in:

cd '/Users/YOURUSERNAME/Library/Application Support/OneDrive/Settings'

4. Ascertain which configuration directory contains the folder configuration you are looking for. The best way to do this is by running the below command (ensuring you replace SEARCHQUERY with the existing directory name that you are trying to rename)

grep -Ri 'SEARCHQUERY' *

You will get a response such as:
Business1/b23ae12f-30d4-4344-8b0c-ada2e6d1e274.ini: … [whole heap of information]

5. Back up the file by making a copy such as the below command (ensuring you replace my example with the filename returned by your query in the step above:

cp Business1/b23ae12f-30d4-4344-8b0c-ada2e6d1e274.ini Business1/b23ae12f-30d4-4344-8b0c-ada2e6d1e274.ini.bak2020-08-26
OR in template format:
cp YOUR.ini YourFolder/YOUR.ini.bakYYYY-MM-DD

6. Open the configuration file in your favourite text editor (whether that is VIM, BBEdit, or others) and change the folder name on the line that starts with ‘libraryScope’

7. Save and close the file

8. Rename or relocate your OneDrive folder BEFORE starting up OneDrive to the new name/location you entered in the configuration file in the steps above

9. Start OneDrive and it will pick up your folder in the new location and continue Syncing


Privacy Preference Center



    Utilised to provide advertising



    Utilised to enable Google Analytics