0

I have to move multiple files or the entire folder from a user-choosen source folder to a destination folder, which could be fixed. The point is that that those files are non .txt files but .wavs, since are samples, and movefile just accept text scalar. Any help? This is my code:

`samp=[];
while length(samp)<270
    selpath=uigetdir(path,"Select the samples you want to use");
    lista=dir(selpath);
    justfiles = lista(~[lista.isdir]);
    list=struct2cell(justfiles);
    samp=[samp;list(1,:)'];    
end`

I've tried some solution like movefile or system but nothing worked (or I made mistakes). The system(move) didnt' work.

Corrado
  • 11
  • 3
  • 1
    The "text scalar" has nothing to do with the file contents. The input to `movefile` must be a string ("text scalar") with the file or directory name to move. Just loop over your list of files and move them one by one. – Cris Luengo May 09 '23 at 20:57

0 Answers0