% copyscript.m

%    clear all ;  close all ;

    picsdir = {'2008_05_01','2008_05_02','2008_05_03'} ;

    for j = 1:length(picsdir)

        cd(fullfile('~','Pictures',picsdir{j})) ;

        picsindir = dir ;

        for i = 1:length(picsindir)

            [pathstr,name,ext,versn] = fileparts(picsindir(i).name) ;

            if numel(name) > 0 && strcmp(name(1),'N') && strcmp(ext,'.JPG')

                namenum = name(end-2:end) ;
%                disp(['~/jhead -ft ' picsindir(i).name]) ;
%                system(['~/jhead -ft ' picsindir(i).name]) ;
                disp(['cp -Rp ' picsindir(i).name ' ../NeilStag/NeilStag_' namenum '.jpg']) ;
                system(['cp -Rp ' picsindir(i).name ' ../NeilStag/NeilStag_' namenum '.jpg']) ;

            end

        end

    end

    return


