Hello dear MathWorks Community,
I got a small problem which stops me to finish my project.
I got this Path to the folder i choose for my project:
X:\Mieß\Vorlagen\019
But now i need the foldername 019 to use it in the output Excelfilename.
How can i save the foldername as an Char array. (just the the Foldername 019, not the Path)
I need the programm to do this automatic, because it got a other folder every restart of the programm (at the beginning of the programm the user can choose the Folder)
Thanks for your help

 채택된 답변

Jan
Jan 2017년 8월 2일

1 개 추천

If 'X:\Mieß\Vorlagen\019' is the available input, use:
S = 'X:\Mieß\Vorlagen\019';
[~, LastPart] = fileparts(S);

댓글 수: 2

Martin Mieß
Martin Mieß 2017년 8월 2일
Thank you, ill try it out :D
Martin Mieß
Martin Mieß 2017년 8월 2일
It works. Thats a vote for you :D

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기

질문:

2017년 8월 2일

댓글:

2017년 8월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by