PRO get_file, file_name, ncdf_db ; get remote file @common @com_eg str = strsplit(ncdf_db, ':', /EXTRACT) machine = str[0] path_remote = str[1] IF machine NE 'local' THEN BEGIN print, ' Data base = '+ncdf_db print, ' ' ; check if file is in default directory local_dir = (strsplit(data_bases[0], ':', /EXTRACT))[1] list = findfile(local_dir+file_name, count = nb_file) IF nb_file EQ 0 THEN BEGIN print, ' '+machine+'.get '+file_name+' '+path_remote+' '+local_dir spawn, hom_def+'remote/'+machine+'.get '+file_name+' '+path_remote+' '+local_dir, result print, result ENDIF ELSE print, ' File '+file_name+' already in ',local_dir & print, '' ncdf_db = data_bases[0] ENDIF END