source: trunk/procs/get_file.pro @ 68

Last change on this file since 68 was 64, checked in by kolasinski, 16 years ago

change str_sep to strsplit in get_file

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