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