function L = allpath(chemin)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%give the path of all files in the folder
%%inputs:
% chemin: path of the folder, can be regular expression
%%outpyut:
%L: list of all file paths
%%exemple:
%L = allpath('sess5/*.BLK');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%files names
chemins = dir(chemin);
%concatenation with the folder path
L = strcat({regexprep(chemin, '[^/]*$', '')},{chemins.name});
