texDir = 'd:\checkouts\xbsb\latex\_tests';

texFiles = dir(texDir);

for iFile = 3:numel(texFiles)
    if numel(texFiles(iFile).name) > 4 && strcmpi(texFiles(iFile).name(end-3:end), '.tex')
        texFile = fullfile(texFiles(iFile).folder, texFiles(iFile).name);
        
        
    end
end