function[n_new]=get_etl_gps_files(etldir)
n_new=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);  %'11'

% first see if anything already in data/new (manual xfer)
myfilelist = dir(['data/gps/new/gps0' '*.txt' ]);
if ~isempty(myfilelist) 
    n_new=length(myfilelist);
else
    % see what's on the server:
    edirs= dir([etldir '/' yrstr '*']);
    numedirs=length(edirs);
    % eg:   11087  11089  11088  11090
    % check last 2 directories, and check file sizes
    % or only copy 61-line files
    for chk=(numedirs-1):numedirs
        thedir= edirs(chk).name;    % e.g.  11090
        r_filelist = dir ([ etldir '/'  thedir '/gps0*.txt']);
        numetl=length(r_filelist);
        % see what we've got; filenames contain orig dir name
        myfilelist = dir(['data/gps/read/gps0' thedir '*.txt' ]);
        %   me101109112_raw.txt
        numold=length(myfilelist);
        if numold < numetl,
            for iex=1:numetl
                cfile=[ etldir '/'  thedir '/' r_filelist(iex).name ];
                if exist(['data/gps/read/' r_filelist(iex).name],'file') == 0 ...
                        && exist(['data/gps/new/' r_filelist(iex).name],'file') == 0
                    if dbg==1
                        disp(['will copyfile( ' cfile, ' to data/etl/new)']);
                    end
                    copyfile(cfile, 'data/gps/new');
                    n_new=n_new + 1;
                end
            end
        end
    end
%     newfdir=dir('data/gps/new/*_raw.txt');
%     n_new=length(newfdir);
end
fprintf('%d files to process\n', n_new);



