function[newfiles]=update_etl_files(etldir)
newfiles=0;
dbg=1;
% now set in set_up as etldir
%DATADIR = '\\Ps3das01\SharedDocs';
% workgroup psd3, system ps3das02

% directories are YYDDD, e.g. 10003 for Jan 3 2010
dv=datevec(now);
my_year=dv(1) - 2000; yrstr=num2str(my_year);

% see what's on the server:
edirs= dir([etldir '/' yrstr '*']);
% eg:   11087  11089  11088  11090
lastdir= edirs(end).name;    %  11090
metfilelist = dir ([ etldir '/'  lastdir '/met*.txt']);
numetl=length(metfilelist);
if dbg==1
    fprintf('%d files on %s \n',numetl, [etldir '/' lastdir]);
end
% see what we've got
myfilelist = dir(['data/etl/read/met0' lastdir '*.txt' ]);
% file names like:  met01000314_raw.txt
numold=length(myfilelist);
if dbg==1
    fprintf('%d  local files\n',numold);
end
if numold < numetl,
    for iex=1:numetl
        cfile=[ etldir '/'  lastdir '/' metfilelist(iex).name ];
        if exist(['data/etl/read/' metfilelist(iex).name],'file') == 0
            if dbg==1
                disp(['will copyfile( ' cfile, ' to data/etl/new)']);
            end
            copyfile(cfile, 'data/etl/new');
            newfiles=newfiles + 1;
        end
    end
end

