function cnt_id=sonobot_get_directory(directory,db_file,ref_nr,cnt_id)
    % Read files in directory dir_
    dir_contents = dir([directory+'/*.timeGeo']);    
    for idx=1:length(dir_contents)
        timeGeo=is_in_db(db_file,dir_contents(idx));
        if isempty(timeGeo)
            timeGeo=read_timeGeo_file(dir_contents(idx),ref_nr,cnt_id);
            insert_timeGeo_in_db(db_file,timeGeo);
        end
        cnt_id=cnt_id+1;
    end
    

end