How do I find out the full path for a directory?

12 views (last 30 days)
I have the name of a directory, but I would like to find out its full path. How can I do that?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 26 Feb 2018
You can use the "what" command.  Please refer to the documentation here: <http://www.mathworks.com/help/matlab/ref/what.html>
 
>> s = what('myDir');
>> s.path
ans =
C:\path\to\myDir

More Answers (0)

Categories

Find more on Files and Folders in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!