Extract .txt files from a list
Show older comments
Hi,
I am trying to extract .txt files from a list of files I created into a cell array. From there I want to put them in a directory that feeds into a loop. Can you help please?
Thanks
3 Comments
Adam
on 9 Jun 2015
doc fileparts
should help. Just test the 'ext' output from that with '.txt' for each file in your array.
Walter Roberson
on 9 Jun 2015
Yes, and notice that the ext will include the '.' so Adam is correct in saying to compare against '.txt' rather than 'txt'
Yewande Oni
on 10 Jun 2015
Accepted Answer
More Answers (0)
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!