%% Input = list of files (string list)
% Output = starting times, dates of files, corresponding survival files and
% boxes in which experiments were run

function [startList,dateList,survivalList, boxList] = pullFileInfo(files)
    [dateList,survivalList,boxList] = deal(repmat("",1,length(files)));
    startList = zeros(1,length(files));
    
    for i=1:length(files)
        splitfile = split(files(i),"\");
        expDir = "";
        for j=1:length(splitfile)-1
            expDir = strcat(expDir,splitfile(j),"\");
        end
        expFile = splitfile(length(splitfile)); 
        
        startList(i) = returnExpStartTime(string(expFile));
        expDate = returnExpDate(string(expFile));
        dateList(i) = expDate;
        survivalList(i) = strcat(expDir,expDate,"-survival_data.xlsx");
        try
            boxList(i) = string(getboxID(expDir));
        catch
            boxList(i) = 'NA';
        end
    end
end
