source: trunk/procs/get_file.pro @ 12

Last change on this file since 12 was 2, checked in by post_it, 17 years ago

Initial import from ~/POST_IT/

File size: 803 bytes
Line 
1PRO get_file, file_name, ncdf_db
2
3; get remote file
4
5@common
6@com_eg
7
8   machine = (str_sep(ncdf_db, ':'))[0]
9   path_remote = (str_sep(ncdf_db, ':'))[1]
10
11   IF machine NE 'local' THEN BEGIN
12
13      print, '    Data base = '+ncdf_db
14      print, ' '
15     
16      ; check if file is in default directory
17
18      local_dir = (str_sep(data_bases[0], ':'))[1]
19
20      list = findfile(local_dir+file_name, count = nb_file)
21     
22      IF nb_file EQ 0 THEN BEGIN
23         
24         print, '    '+machine+'.get '+file_name+' '+path_remote+' '+local_dir
25         spawn, hom_def+'remote/'+machine+'.get '+file_name+' '+path_remote+' '+local_dir, result
26         print, result
27
28      ENDIF ELSE print, '    File '+file_name+' already in ',local_dir & print, ''
29
30      ncdf_db = data_bases[0]
31
32   ENDIF
33
34
35
36END
Note: See TracBrowser for help on using the repository browser.