MATLAB: How to select a folder

Dear matlab experts,
I’m facing a problem. I want to select a folder. I used uigetfile() function but it takes me to the contents/images of the folder. I don’t want this. I want to stop by selecting a folder. How can I do that? Please let me know.
Thanks and Regards Shaila

Best Answer

Use uigetdir(). But when you use that, you can't see any of the files in the folder, which would help you to know if you were in the right folder.