mmcd d = dir dstr = {d.name}; [s,ok] = listdlg('PromptString','Select a file:',... 'SelectionMode','single',... 'ListString',dstr) if ok, disp(['You selected: ' dstr{s}]), end