I have the following problem. I use a self organizing map to sort images (>20000) and copy the sorted ones into a new folder in the new order. It turned out that copyfile is very very slow (1 image per second) and as I found in several posts there is no solution to this. So 1. question is there a solution ? I tried an alternative and I am now just renaming the files using:
c=1;
for i = b
file = av_files(i).name;
in = strcat(inputdir,'\',file);
out =sprintf('%s\\%0.5i_%s',inputdir,c,file);
java.io.File(in).renameTo(java.io.File(out));
c=c+1;
end
Now I get the error
Static method or constructor invocations cannot be indexed.
The problem seems to be that I am using it in a for loop which Matlab does not like. Is there a way around this? So the question is mainly how to rename and/or copy a large number of files in a fast way without error in Matlab.
btw movefile
is comparably slow