dirs= dir;

dirnames = {};
ctrnames = 1;
for idxaam =   3:  length( dirs),
    if dirs(idxaam).isdir,
        dirnames{ ctrnames } = dirs(idxaam).name;
        ctrnames = ctrnames + 1;
    end
    
end
    
    
    
ctratp = 1;


for idxaam =   1:length( dirnames),
    
    
    cd( dirnames{idxaam} );
    
    if exist('merged_cropped.png', 'file') == 2,        
        
        mkdir(['D:\there\', dirnames{idxaam}]);
        copyfile('merged_cropped.png', ['D:\there\', dirnames{idxaam}, '\merged_cropped.png' ]);
        
    end
    
    if exist('Alt_merged_cropped.png', 'file') == 2,        
        copyfile('Alt_merged_cropped.png', ['D:\there\', dirnames{idxaam}, '\Alt_merged_cropped.png' ]);
        
    end
       
    
    
    
        
    
    cd ..
end