comp.files = fullfile({dinfo.folder}, {dinfo.name});
numfiles = length(comp.files);
Now comp.files will be a cell array of character vectors, each of which is a fully-qualified file name that has "post" as part of the name.
For other files without "post" the code is slightly longer
ndpinfo([ndpinfo.isdir]) = [];
npdinfo(contains({npdinfo.name}, 'post')) = [];
comp.npfiles = fullfile({npdinfo.folder}, {npdinfo.name});
numnpfiles = length(comp.npfiles);
... If you are wanting both lists, then it is easier to just do one pass, like
dinfo([dinfo.isdir]) = [];
mask = contains({dinfo.name}, 'post');
comp.files = fullfile({dinfo(mask).folder}, {dinfo(mask).name});
numfiles = length(comp.files);
comp.npfiles = fullfile({dinfo(~mask).folder}, {dinfo(~mask).name});