MATLAB: Move-File: Can’t move certain Files to another Folder!

MATLABmdfmovefile

Hello! I want to extract some Files based on a certain criteria (here: bytes < 70 000 000). But I don't get it to work, some Ideas?
This is my approach so far..
files_zum_Testen = dir('...\MOVE_MDF\*.mf4');
move_bedingung = [files_zum_Testen.bytes] < 70000000;
move_list = fullfile({files_zum_Testen(move_bedingung).folder}, {files_zum_Testen(move_bedingung).name});
movefile (move_list, newFolder)

Best Answer

Malte - you haven't posted the error message or describe fully what you mean by I don't get it to work. According to movefile input arguments, the source is a character vector corresponding to a single file or directory. I don't think that passing in a cell array (list of files) will work and so you will need to move each file individually.