multiple txt files selection (all at once)

How can I select multiple txt files in matlab all at once in order to edit them simultaneously afterwards? Is there an algorithm I can use such as uigetfile or uigetdir (which one is more useful?)? Thank you in advance!

 採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 8 日

0 投票

[filenames, filepath] = uigetfile('Pick some files','Multi', 'on');
Now filepath will be a string, and filenames will be a cell array of strings.
If you want the user to pick a directory and then you want to extract all files of a particular kind from the directory, then use uigetdir() together with http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

1 件のコメント

katerina biot
katerina biot 2015 年 9 月 8 日
Thank you very much for your answer. I just started using matlab so there are some other things I would also like to ask. What if other than extraxt them I also want to edit them? I use the same algorithm (uigetdir() together with http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F)? I also want to ask what If the files that I want to process are not sequentially numbered, is there another way or I should rename them? And by ''together'' you mean to use the codes subsequently or to incorporate the one code to the other?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeApp Building についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by