cd /repository/camera/raw
addpath /repository/camera

if exist('/repository/camera/processed/temp')
    rmdir('/repository/camera/processed/temp','s');
end

plik=0;
strukt=dir();
pierwszy=strukt(3).name
maxfol=length(strukt)
for l=maxfol:-1:000
    if strukt(l).isdir == 1
        ostatni=strukt(l).name
        break
    end
end

f_fol = str2num(pierwszy);
l_fol = str2num(ostatni);

sf=0;
ef=999;

skrypt_start=datestr(now())
for i=f_fol:l_fol
    folder=num2str(i);
    if length(folder)==1
        d_name=['00' folder];
    elseif length(folder)==2
        d_name=['0' folder];
    else
        d_name=folder;
    end
    
    for j=sf:ef
        s_folder=num2str(j);
        if length(s_folder)==1
            sd_name=['00' s_folder];
        elseif length(s_folder)==2
            sd_name=['0' s_folder];
        else
        sd_name=s_folder;
        end
        
        fol1=num2str(d_name);
        fol2=num2str(sd_name);
        fold=[fol1,'/',fol2,'/INFO.jpg'];
        size_of_file = dir(fold);
        sciezka=[fol1,'/',fol2,'/'];
        if (size_of_file.bytes > 0)
            date_check('INFO.jpg', sciezka);
        end
    end
    
end

skrypt_end=datestr(now())