how to get folder name without using dialog box

조회 수: 2 (최근 30일)
Leonardo Wayne
Leonardo Wayne 2016년 3월 18일
댓글: Image Analyst 2016년 3월 18일
what is the command that returns the folder name without using dialog box?

답변 (1개)

Walter Roberson
Walter Roberson 2016년 3월 18일
If you mean the current folder name, then see cd() or pwd()
If you mean the folder name associated with a file whose name you would pass to the command, then see fileparts()
If you mean that you want to present a menu to the user of folder names to choose from, but you are working in a text only environment where you do not have access to graphics, then use menu()
Otherwise.. please clarify which folder name you would want returned and what (if any) interaction with the user there would be.
  댓글 수: 1
Image Analyst
Image Analyst 2016년 3월 18일
I thought menu() brought up a window? I guess if you wanted to be cruel to your users, instead of using uigetdir() or menu(), you could use input() and ask them to type it in, though you'd likely get complaints from your users on your primitive programming capabilities so I wouldn't recommend it.

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

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by