Forum Discussion
OneDrive folders when switching to a new computer
Where OneDrive stores “which folders are synced”
- The list of selected folders (from “Choose folders” in OneDrive Settings) is not stored on the SD card itself.
- It’s stored in your Windows user profile in the registry and config files, tied to that computer.
- Specifically, OneDrive keeps:
- Registry keys under
HKEY_CURRENT_USER\Software\Microsoft\OneDrive
- Config files in
%localappdata%\Microsoft\OneDrive\settings
These settings are not stored on OneDrive cloud or the external drive itself. They are local configurations that tell your computer which folders to sync.
This means when you move the SD card to a new computer, OneDrive does not automatically know which folders were selected to sync before.
What happens when moving the SD card and setting up a new computer?
- When you move the SD card:
- The actual files and folders are on the SD card.
- The local sync settings are stored on your new computer's user profile.
- If you install OneDrive and point it to the SD card location (per the article), OneDrive will attempt to sync based on your current settings.
Will the setup work if you do as in the article?
- Yes, if you:
- Install OneDrive on the new computer.
- Sign in with your account.
- During setup, select the same folder location on your SD card (matching the previous path).
- Choose the same folders to sync (or "Sync all" if desired).
- However, the previous sync settings (which folders are selected) are not automatically restored from the old computer unless you manually:
- Reconfigure the sync settings in the new OneDrive app.
- Or, copy the configuration files from the old computer's profile (if you have access), which is not officially supported and may cause issues.
Best approach to ensure a smooth transition:
- On your old computer:
- Before moving, note which folders are selected for sync.
- You can use OneDrive's Settings > Account > Choose folders to see and document this list.
- On your new computer:
- Install OneDrive.
- Set the local folder to the same SD card location.
- Sign in.
- When prompted to select folders to sync, select the same folders as before.
- Let OneDrive run a full sync check (can take a while).
- Ensure that the folder structure matches; otherwise, OneDrive may create duplicates or errors.
- Important:
- You must not connect the SD card to two computers simultaneously** with the same OneDrive account, as this can cause conflicts.
- If you want to avoid re-syncing everything, consider pausing sync initially, then adjusting folder selections.
Regarding batch scripts for folder creation and sharing
- Creating folders via script:
- Yes, you can use batch files or PowerShell scripts to automate folder creation.
- Sharing folders with expiration:
- This cannot be done directly via batch scripts.
- You must use OneDrive's web interface or Microsoft Graph API for automation:
- Microsoft Graph API allows programmatic sharing, including setting expiration dates.
- This approach requires scripting with PowerShell, Python, or other languages using REST API.
- PowerShell + Graph API example:
- You can write scripts to:
- Create folders.
- Share with users.
- Set expiration dates on sharing links.
- Third-party tools:
- Some third-party tools or scripts exist that automate sharing, but Microsoft Graph API is the most flexible and supported.
At the End…
Your old SD card trick will still work on the new computer, but you must reselect the sync folders manually — Windows does not carry that config.
For batch folder creation + sharing, PowerShell + Graph API is the way to go — it avoids “clickoholism.”
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.