Filtering txt files out structs and assign to subfolder
Show older comments
Hi There,
I was trying to filter out the 'CAp_*.txt' files and assign it to the last subfolder, but did not succeed. How can I do this?
Kind Regards,

1 Comment
Bas Bloemendaal
on 24 Nov 2021
Answers (1)
Shravan Kumar Vankaramoni
on 9 Dec 2021
Hi,
You can simply use the below code to filter out the files
files = dir(CAp_*.txt) % This will give all the .txt files starting with CAp_
To copy files to a subfolder, refer the below answer:
Categories
Find more on Whos 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!