%   RandRenamePic.m

%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION. 



RandVec=randperm(575);
for i=1:575	
	i=i
	if i<10
                                                                     
		FileNameOld=['File.00' int2str(i)'];
	elseif i>9 & i<100
		FileNameOld=['File.0' int2str(i)];
	elseif i>99 & i<1000
		FileNameOld=['File.' int2str(i)];
	end
	if RandVec(i)<10
		FileNameNew=['File.00' int2str(RandVec(i))'];
	elseif RandVec(i)>9 & i<100
		FileNameNew=['File.0' int2str(RandVec(i))];
	elseif RandVec(i)>99 & i<1000
		FileNameNew=['File.' int2str(RandVec(i))];
	end
	arename(FileNameOld,FileNameNew)
end
