function CopyTo(Origin,Destination,SizeInBytesMin,SizeInBytesMax)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Transfer of files form origin to destination under the condition that the
%transferd files are larger than SizeInBytesMin and smaller than SizeIn
%Origin and Destination are string variables and indicate the path of the
%origin of the data and its destination
%Imput Example: 
%Origin = 'C:RindKind\oldProjects\'
%Destination = 'C:RindKind\newProjects\' [let op! no backslash]
%SizeInBytes = 100 
%Origin must exist!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

legent=dir(Origin);                                  
for x=1:length(legent)                              
    if  legent(x).bytes > SizeInBytesMin && SizeInBytesMax > legent(x).bytes
        old_file = [Origin char(legent(x).name)];
        copyfile(old_file,Destination,'f');
    end
end