Dear all..
i'm using the following code to write file names that exist in folder or sub-folder … in matlab table.. but its write these files along with thier extension .. such that if file AA is text file.. then its name in table is AA.txt and so on.. how do i avoid extension in my code.. thanks
projectdir = 'D:\test';d = dir(fullfile(projectdir, '*'));files = [];for subdir = d([d.isdir] & ~ismember({d.name},{'.', '..'}))' subfiles = dir(fullfile(projectdir, subdir.name, '*.txt')); [subfiles.folder] = deal(subdir.name); files = [files; subfiles]; enddetails = struct2table(files);
Best Answer