Generic Change of Directory
조회 수: 2 (최근 30일)
이전 댓글 표시
If I want to use the change directory command to navigate to the user's desktop without calling out that users name, how do I specify that?
댓글 수: 0
답변 (1개)
Chad Gilbert
2013년 7월 10일
To cover most cases, you could do:
cd ~/Desktop
if you're running linux or Mac, Or:
[a,b] = system('echo %UserProfile%\Desktop')
cd(b)
on windows. I'm on a linux machine, so I haven't tested the windows solution. You may need to tweak it. If your machine is set up in some non-standard way, or you're using some other OS, then this may not apply.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Programming Utilities에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!