Sorting file (from a text file) and copying file to the new folder
1 view (last 30 days)
Dear MATLAB experts
I want to sort the content of file based on the text file (e.g. *.txt) and then copy all the list files into another directory.
Source: C:\ sub001 (a list of subjects on the text file) ○ A ■ Sub-directory ○ B ■ Sub-directory
Text file: sub001 , sub002 and etc.
Thanks for considering my questions.
Paolo on 12 Jul 2018
If I am understanding the question correctly the following should help you:
fid = fopen('SubjectsID.txt')
tline = fgetl(fid);
name = strcat(tline,'.txt');