This is a far as I've got
ext=char(zeros(size(filen)));
name=char(zeros(size(filen)));
for i = 1:size(filen)
[~,name(i),ext(i)] = fileparts(char(filen(i)));
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!