A Microsoft file hosting and synchronization service.
Stop OneDrive backup for Documents and choose Keep files only on my PC so NinjaTrader can use a local Documents folder without OneDrive controlling its files.
Safely move Documents back to the PC
- Exit NinjaTrader completely.
This prevents open files from blocking the move; OneDrive cannot move files that are currently open.^1^ - Ensure the Documents files are downloaded first.
- Open File Explorer → OneDrive – Personal → Documents.
- If any items show a cloud icon, right-click the Documents folder and select Always keep on this device.
- Wait until downloading completes before continuing. Microsoft requires cloud-only files to be downloaded before they can be moved back to the PC.^1^
- Turn off Documents folder backup.
- Select the OneDrive cloud icon in the Windows notification area.
- Select Help & Settings → Settings.
- Open Sync and backup → Manage backup.
- Turn off Documents.
- When prompted, select Keep files only on my PC. Do not choose “only in OneDrive,” because that removes the local copies.^1^
- Verify the local location.
- Open File Explorer and enter
%USERPROFILE%\Documentsin the address bar. - Confirm the NinjaTrader files expected in Documents are present locally.
- The location should resolve under
C:\Users\<your-name>\Documents, not underC:\Users\<your-name>\OneDrive\Documents.
- Open File Explorer and enter
- Start NinjaTrader and test the operation that was failing, such as importing the NinjaScript add-on. NinjaTrader specifically documents OneDrive interference with its Documents-path file access, including an “Access to the path is denied” error during add-on import.^2^
Do not delete the old OneDrive copy until NinjaTrader starts successfully and its workspaces, templates, add-ons, and other required data are present.
If Documents cannot be moved
- Close every application using files in Documents and retry.
- If OneDrive reports “Some files couldn’t be moved,” return to the OneDrive Documents folder, select Always keep on this device, wait for all downloads to finish, and then stop backup again.^1^
- If you want to stop OneDrive entirely rather than only exclude Documents, use OneDrive Settings → Account → Unlink this PC. Unlinking is unnecessary when the goal is only to keep NinjaTrader’s Documents data local.^3^
You can continue using OneDrive for Desktop, Pictures, or manually selected folders while leaving Documents local.
References