- Navigate to your OneDrive folder in Windows File Explorer. From here, you can copy the full path into MATLAB.
- Use "getenv" to get the full path to your root OneDrive folder:or for a corporate license:getenv('OneDrive')getenv('OneDriveCommercial')
How can I use a OneDrive folder on path functions in MATLAB R2024b?
13 views (last 30 days)
Show older comments
MathWorks Support Team
on 23 Apr 2025
Answered: MathWorks Support Team
on 24 Apr 2025
I have a folder in OneDrive. In MATLAB R2024b, how can I use "cd", "addpath", and similar functions on this folder?
Accepted Answer
MathWorks Support Team
on 23 Apr 2025
OneDrive folders can be treated like normal folders in a filepath. Here's an example use case with "cd":
cd("C:\Users\jdoe\OneDrive - MathWorks\Documents\Project")
There are many ways to get the path to your OneDrive folder. Here are two convenient methods:
0 Comments
More Answers (0)
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!