This is how far I take it yet. It can read the first 10 and read the file number even if they are not in correct order.
% code
clear all
clc
path =[pwd '\'];
Stru =dir( fullfile(path, '*.vsi') );
fileNames = { Stru.name };
outputPath = [path 'NewImage\'];%function_GenerateNumber(j,2)
mkdir(outputPath);
sequenceNum = {9,7,5,3,1,10,8,6,4,2};
iNum=1;
for jter = 1 : 8
for iter = 1: 10
Name=fileNames{iter};
NumofName=Name(7:length(Name)-4);
NuOfFile=str2double(NumofName);
Indx = cellfun(@(x)isequal(x, NuOfFile),sequenceNum);
[row,col] = find(Indx);
strFileName = sequenceNum{col}+(jter-1)*10;
NewFileNum = sequenceNum{strFileName}+(jter-1)*10;
newName = fullfile(outputPath, sprintf('%02d.vsi', NewFileNum) );
copyfile(fullfile(path, fileNames{iNum}), newName );
iNum = iNum + 1;
end
end
% end of code