clear;
close all;

fileNames = uigetfile('*','Select your dive files','MultiSelect','on')

%if only one file is selected need to convert to cell, not leave as string
if (ischar(fileNames))
    fileNames = {fileNames};
end


for index=1:length(fileNames)
    disp(fileNames{index})
    clearvars -except fileNames index;
    close all;
    
    %science data
    parseSciData(fileNames{index});
    
    save(fileNames{index});
    savefig(fileNames{index});
    
    %eng data
    parseEngData(fileNames{index});
end