Contents

disp('ftp to NOAA server in Boulder')
clear dir
% write some files to voodoo/incoming
jd=num2str(ddd);
ftp to NOAA server in Boulder

Connect to the FTP server, ftp.etl.noaa.gov, creating the FTP object, tmw. Then it lists the files in VOODOO/incoming, and set the FTP transfer type to binary.

tmw=ftp('ftp.etl.noaa.gov','etlguest','ludovic.bariteau@noaa.gov');
% tmw=ftp('ftp.etl.noaa.gov','etlguest','RHB@noaa.gov');
dir(tmw)
binary(tmw);  %set FTP transfer type to binary
 
alan        et2         et7         name        psd1        psd3                                
et1         et6         lost+found  psd0        psd2                                            
 

Create the directory lbariteau (which can be change to another name, like Stratus...), and go to this new directory

mkdir(tmw,'psd3/lbariteau/');
cd(tmw,'psd3/lbariteau');

Create the directory dayJD (day290 for example), and go to this new directory

mkdir(tmw,['day', jd]);
c=cd(tmw,['day', jd]);

To avoid problems, we erase any possible files into the directory dayJD

delete(tmw,'*.*');

Upload .jpeg and .txt files to FTP server

try
   mput(tmw,[way_proc_data_flux, '*', jd, '*.txt']);
   mput(tmw,[way_images_flux, '*', jd, '*.jpg']);
catch
    disp(['Files present in', c])
    dir(tmw)
    error('Files already uploaded on the server.')
end;

List contents of directory dayJD on FTP server.

dr=dir(tmw);
disp('  ');
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
dir(tmw)
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp(['     <<<<<<<<  Number of files transfered: ', num2str(length(dr)), '    >>>>>>>>>>>>>>>']);
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
IR_flux_280.jpg              PSD_GPS_Ship_track_280.jpg   proc_pc280.txt               
LicH2O_spectrum28000.jpg     Pressure_280.jpg             proc_rad280.txt              
LicH2O_spectrum28012.jpg     RH_280.jpg                   proc_son280.txt              
Licor_AGC_280.jpg            Solar_flux_280.jpg           q_sp28012.txt                
Licor_CO2_280.jpg            Sonic_rel_wnd_dir_280.jpg    rain_gauge_function_280.jpg  
Licor_press_280.jpg          Sonic_rel_wnd_speed_280.jpg  rainrate_280.jpg             
Licor_spechum_280.jpg        Sonic_temp_280.jpg           son_spectrum28000.jpg        
Licor_spechum_comp_280.jpg   Sonic_winds_280.jpg          son_spectrum28012.jpg        
Licor_temp_280.jpg           Temperatures_280.jpg         w_sp28012.txt                
PSD_GPS_COG_280.jpg          backflow_indicator_280.jpg                                
PSD_GPS_SOG_280.jpg          motion_280.jpg                                            
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     <<<<<<<<  Number of files transfered: 31    >>>>>>>>>>>>>>>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Close connection with FTP server.

close(tmw);
clear tmw