function [pathstr, name, ext] = mergeDemoFilesAndSort(fns,rundir)
cntr=0;
for i = 1:size(fns,1)
    fid=fopen([rundir filesep fns(i).name]);
   
    while ~feof(fid)
        cntr = cntr+1;
        line = fgetl(fid);
        line = strrep(line,'\\','\');
        [pathstr{cntr}, name{cntr}, ext{cntr}] = fileparts(line);
    end
    fclose(fid);
end
[dummy, id] = sort(lower(name));
pathstr=pathstr(id);
name=name(id);
ext=ext(id);

