function fileInd = bladedAbbFind(fullFile, abb)
% bladedAbbFind 
%   used to find the '%*' file for a given abbreviation
%   filenafullFileme: the file path + name wo extention
%   abb: abbreviation

%   Project: IMPACT
%   Title of Code: bladedAbbFind
%   Relevant additional documentation:
%   Developer: Carlos Gonzalez
%   External Dependencies: NA
%
%   Disclaimer
%   CAUTION: It is strongly recommended that changes to this code
%   should be avoided without first consulting with authors.



all = dir([fullFile, '.%*']);
fileArray = {all.name};
nFiles = numel(fileArray);
fileInd = [];
filepath = fileparts(fullFile);
for m = 1: nFiles
    All = bladedPtRead(fullfile(filepath, fileArray{m}));
    if isempty(All)
        fileInd = [];
        return
    end
    signal = All.variab;
    fileExtention = ['%', All.file(end-1:end)];
    aa = strfind(signal, abb);
    if ~isempty([aa{:}])
        fileInd = fileExtention;
        break
    end
end
