
Why do I receive an error while trying to "cd" to folders on Mac?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 5 Mär. 2025
Bearbeitet: MathWorks Support Team
am 5 Apr. 2025
Diese(r) Frage wurde durch Walter Roberson
markiert
On my Mac, I am trying to "cd" to the to the Desktop folder in MATLAB using the command below:
>> cd /Users/myusername/Desktop
However, I am encountering the following error:
Error using cd
Unable to change current folder to '/Users/myusername/Desktop'
The error does not occur when trying to navigate to other folders, such as /Users/myusername/Documents.
What is happening here? How can I fix this issue?
Akzeptierte Antwort
MathWorks Support Team
am 4 Apr. 2025
Bearbeitet: MathWorks Support Team
am 5 Apr. 2025
The underlying issue is related to the application permissions within your operating system. Specifically, on macOS, applications are granted access to specific folders, and it seems that MATLAB currently lacks permission to access the Desktop folder.
To address this problem, you need to grant MATLAB the necessary access permissions. You can do so by following the instructions in Control access to files and folders on Mac and/or Controlling app access to files in macOS.
We also recommend giving MATLAB "Full Disk Access" by going through Apple menu > System Settings > Privacy & Security > Full Disk Access, as indicated in the picture below:

0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!