function [ExistFilePathMat,NFilesExist,NotExistFilePathMat,NFilesNotExist]=AllCon;
%---------------------------------------------------------------
% user variables defined here 
%---------------------------------------------------------------
global SubVec Con1 Con2
if isempty(SubVec)
   SubVec=[2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18]
end
BaseVec=zeros(size(SubVec));
MovStr='mov';

NSub=length(SubVec);
if Con1>99
   ConStr1=['0',int2str(Con1)];
elseif Con1>9 & Con1<100 
   ConStr1=['00',int2str(Con1)];
else
   ConStr1=['000',int2str(Con1)];
end
if Con2>99
   ConStr2=['0',int2str(Con2)];
elseif Con2>9 & Con2<100 
   ConStr2=['00',int2str(Con2)];
else
   ConStr2=['000',int2str(Con2)];
end
NFilesExist=0;
NFilesNotExist=0;
ExistFilePathMat=[];
NotExistFilePathMat=[];
for SubInd=1:NSub
   ActSub=SubVec(SubInd);
   ActSubStr=int2str(ActSub);
	if ActSub<10
   	ActSubStr=['0',ActSubStr];
   end
   ActBase=BaseVec(SubInd);
   ActBaseStr=num2str(ActBase);
   BasePath=['E:\SJ\snraS',ActSubStr,'Base',ActBaseStr,MovStr,'\']
   File=['con_',ConStr1,'.img']
	FilePath=[BasePath,File];
   FileExist=exist(FilePath,'file');
   if FileExist==2
      NFilesExist=NFilesExist+1;
   	if NFilesExist==1
      	ExistFilePathMat=char(FilePath);
   	else
     	 	ExistFilePathMat=char(ExistFilePathMat,FilePath);
      end
   else
   	NFilesNotExist=NFilesNotExist+1;
   	if NFilesNotExist==1
      	NotExistFilePathMat=char(FilePath);
   	else
     	 	NotExistFilePathMat=char(NotExistFilePathMat,FilePath);
      end   
   end
   File=['con_',ConStr2,'.img']
	FilePath=[BasePath,File];
   FileExist=exist(FilePath,'file');
   if FileExist==2
      NFilesExist=NFilesExist+1;
   	if NFilesExist==1
      	ExistFilePathMat=char(FilePath);
   	else
     	 	ExistFilePathMat=char(ExistFilePathMat,FilePath);
      end
   else
   	NFilesNotExist=NFilesNotExist+1;
   	if NFilesNotExist==1
      	NotExistFilePathMat=char(FilePath);
   	else
     	 	NotExistFilePathMat=char(NotExistFilePathMat,FilePath);
      end   
   end
end
fprintf(1,'%g existing files chosen:\n\n',NFilesExist)
disp(ExistFilePathMat)
fprintf(1,'\n\n')
fprintf(1,'%g not existing files chosen:\n\n',NFilesNotExist)
disp(NotExistFilePathMat)