% return the list of file and number of file contained in path
% use of wildcard in path allowed
% file_list is a (n_file)*(longest file name length)  character array
% Francois Baratange, Aug 2000.


function[file_list_out,n_file_out]=list_file(path)

H=dir (path);
n_file_out=size(H,1);
file_list_out=H(1).name;

for i=2:n_file_out
file_list_out=str2mat(file_list_out,H(i).name);

end
file_list_out=sortrows(file_list_out);
return