필터 지우기
필터 지우기

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 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