フィルターのクリア

Managing directory paths

4 ビュー (過去 30 日間)
William
William 2012 年 3 月 15 日
I want to shorten a directory path. What I'm looking to do:
Use pwd to return the current folder (which in this example is 'c:\Asset_Allocation\Matlab_codes').
Shorten this path by one folder, i.e. I want to return 'c:\Asset_Allocation'.
What's the simplest way to do so?

採用された回答

Jan
Jan 2012 年 3 月 15 日
S = 'c:\Asset_Allocation\Matlab_codes';
P = fileparts(S)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by