How to Bypass OneDrive Files Download
20 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I just installed MATLAB on my work laptop with Windows 11. The org uses OneDrive for file storage. My OneDrive is set to only download files when they are opened ("Always keep on this device" is checked off).
What I discovered was that MATLAB insists on downloading all the files in the folder where I want to navigate to to save my script. As in, if I want to save the script in the folder OneDrive/Documents/Some Folder, and there is like 20GB of other files in that folder, MATLAB will trigger download of all 20GB of other files before it will even let me save my one file.
What's even worse, when I cancel the automatic download MATLAB freezes. If I Block App in automatic downloads MATLAB freezes. After it freezes the only way to close it is force quit through the Task Manager. So my options are: I let MATLAB download whatever it wants as I navigate through my OneDrive, or freeze the program by cancelling the downloads.
I haven't used MATLAB since v. 2021 and this behavior is new for me. Is there anything I can do to use the software without downloading files to local drive? I simply do not have space for that (nor the time to download GB of files each time I want to move around my OneDrive). I can use admin account but only temporarily, after coordinating with the IT department.
I found a couple of threads here on this topic but nothing that answers my question. Thank you in advance.
0 commentaires
Réponses (1)
Walter Roberson
le 20 Sep 2025
There is a work-around, but you are not going to like it.
The work-around is to not navigate to save your script. Instead, save() specifying the relative path or the fully qualified path.
As you navigate around, you are effectively doing a cd(), and each time you cd(), MATLAB scans all of the .m files in the new directory in order to properly populate the function pointers... since if, for example, you were to navigate to somewhere that contained (say) disp.m then that disp.m would take priority over the MATLAB disp() function.
3 commentaires
Walter Roberson
le 20 Sep 2025
Never make large OneDrive directories your current folder.
Use the "-sd" startup option to temporarily set your starting directory to something other than the remembered starting directory to avoid this problem at startup. https://www.mathworks.com/help/matlab/ref/matlabwindows.html
Voir également
Catégories
En savoir plus sur Adding custom doc dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!