;+ ; NAME: ; clean_loc_smei ; PURPOSE: ; Removes selected files from backup copy of the SMEI tree ; (which is accessible by anonymous ftp) ; CATEGORY: ; smei/pro/main ; CALLING SEQUENCE: ; idl clean_loc_smei.pro ; CALLS: ; txt_read, FindAllFiles, CheckDir, do_file ; PROCEDURE: ; The backup copy is located in subdirectory loc_smei located ; in the anon ftp root. ; MODIFICATION HISTORY: ; DEC-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- sts = txt_read('/etc/init.d/oftpd', smei, /silent) smei = smei[ where(strpos(smei,'FTPROOT=') NE -1) ] smei = strmid(smei,strlen('FTPROOT=')) smei = filepath(root=smei,'loc_smei') message, /info, 'cleaning '+smei template = ['bb3d*.*','nv3d*.*','nv3f*.*','SANIPS.*','*.srf','*.obj','*.o', $ '*.amk','*.gvi','nagoya.*','a77*.*','A77*.*','b77*.*','B77*.*', $ 'h1_*.*','H1_*.*','h2_*.*','H2_*.*','ea_*.*','e3_*.*','EA_*.*', $ 'E3_*.*','core','ipsd2020','ipshtd77','*.bak','*.nic','*.grd'] files = FindAllFiles(template, path=smei, /recursive, count=count,excl_files='*.pro',excl_path=smei, /excl_recursive, /nodir) message, /info, 'Number of files: '+strcompress(count, /rem) FOR i=0,count-1 DO IF NOT CheckDir(files[i]) THEN print, files[i] FOR i=0,count-1 DO IF CheckDir(files[i]) THEN print, 'oops, dir: ',files[i] FOR i=0,count-1 DO IF NOT CheckDir(files[i]) THEN tmp = do_file(/delete, files[i]) exit