MATLAB: Make a string variable from a path in computer without have to type it manually

read textstringvariable

the path to reach the files in my computer is:
C:\Users\Windows\Desktop\FID RMN BASE DE DADOS\H\ioanis_NAME*OF*THE*SAMPLES_h.fid\procpar
C:\Users\Windows\Desktop\FID RMN BASE DE DADOS\H\ioanis_MC8R2_h.fid\procpar
C:\Users\Windows\Desktop\FID RMN BASE DE DADOS\H\ioanis_MC7F22_h.fid\procpar
C:\Users\Windows\Desktop\FID RMN BASE DE DADOS\H\ioanis_MC8RXADsaco2_h.fid\procpar
C:\Users\Windows\Desktop\FID RMN BASE DE DADOS\H\ioanis_ppt2_h.fid\procpar
How can i read only the name of the samples and make a variable < 4x??? char > withot have to type the name of the samples manually
its going to be like this str='NAME*OF*THE*SAMPLES';'MC8R2'; 'MC7F22';'ppt2'

Best Answer

[pathNames, dirNames, fileNames] = dirwalk('C:\Users\Windows\Desktop\FID RMN BASE DE DADOS\H\')