
%%%%%%%%%%%%%%%%%  When read_parameters is sent via ftp (for multiple cruise purpose)    %%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%  check if directories already exist. If not, create them.    %%%%%%%%%%%%%%%%%%%%%%%
if true
%##################################################################################  

%################## Flux directories on DAS  %%####################################
    if exist(way_raw_data_flux(1:3),'dir') && ~exist(way_raw_data_flux,'dir'), mkdir(way_raw_data_flux), end ;    % Raw data path 
    if exist(way_proc_data_flux(1:3),'dir') && ~exist(way_proc_data_flux,'dir'), mkdir(way_proc_data_flux), end ;  % Processed data path
    if exist(way_spec_data_flux(1:3),'dir') && ~exist(way_spec_data_flux,'dir'), mkdir(way_spec_data_flux), end ;    
    if exist(way_images_flux(1:3),'dir') && ~exist(way_images_flux,'dir'), mkdir(way_images_flux), end ;    

%##################%  ceilo directories on DAS %####################################
    if exist(way_images_ceilo(1:3),'dir') && ~exist(way_images_ceilo,'dir'), mkdir(way_images_ceilo), end ; % daily saved impates
    if exist(way_raw_data_ceilo(1:3),'dir') && ~exist(way_raw_data_ceilo,'dir'), mkdir(way_raw_data_ceilo), end ; % Raw Data 
    if exist(way_proc_data_ceilo(1:3),'dir') && ~exist(way_proc_data_ceilo,'dir'), mkdir(way_proc_data_ceilo), end ; % Processed Data

%##################%  Lacie backup directory %####################################
    if exist(way_backup_data(1:3),'dir') && ~exist(way_backup_data,'dir'), mkdir(way_backup_data), end ; % Data back-up path on external hard disk
    
    if exist(way_backup_data(1:3),'dir') && ~exist([way_backup_data 'flux\Raw\'],'dir'), mkdir([way_backup_data 'flux\Raw\']), end ; % 
    if exist(way_backup_data(1:3),'dir') && ~exist([way_backup_data 'flux\Processed\'],'dir'), mkdir([way_backup_data 'flux\Processed\']), end ; % 
    if exist(way_backup_data(1:3),'dir') && ~exist([way_backup_data 'flux\Processed_Images\'],'dir'), mkdir([way_backup_data 'flux\Processed_Images\']), end ; % 
    
    if exist(way_backup_data(1:3),'dir') && ~exist([way_backup_data 'ceilometer\raw\'],'dir'), mkdir([way_backup_data 'ceilometer\raw\']), end ; % 
    if exist(way_backup_data(1:3),'dir') && ~exist([way_backup_data 'ceilometer\raw_images\'],'dir'), mkdir([way_backup_data 'ceilometer\raw_images\']), end ; % 
    if exist(way_backup_data(1:3),'dir') && ~exist([way_backup_data 'ceilometer\Processed\'],'dir'), mkdir([way_backup_data 'ceilometer\Processed\']), end ; % 

%##################################################################################      
end;