필터 지우기
필터 지우기

cd desktop windows Vista/7

조회 수: 1 (최근 30일)
fjnb86
fjnb86 2011년 11월 29일
Hello everyone!
Let me ask a simple question which I dont know if is possible to do it easily.
Due to the fact that the path to desktop requires the name of the user:
c:\documents and settings\(username)\desktop
is there a fast or direct way to set or access using this "cd" command?
For example:
cd desktop
thanks!

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 11월 29일
Hi,
not really. What might help is something like this:
u = getenv('USERPROFILE');
cd(fullfile(u, 'Desktop'))
Titus
  댓글 수: 1
fjnb86
fjnb86 2011년 11월 29일
Thank you for your fast answer ;)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by