How open a folder without the files beginning with '.'
古いコメントを表示
Hi! I want to open all the file of my folder 'calibration_data' (cf Fig1).
But when I do my code (cf Code1), it open 3 files that are'nt in my folder (cf '.', '..' and '.DS_Store' in Fig2).
What are they and how can I get rid of them?
Thanks!
---
Fig1:

Fig2:

Code1:
path_root = '/Users/TP4/calibration_data';
files=dir(fullfile(path_root));
2 件のコメント
Mathieu NOE
2022 年 4 月 25 日
hello
see my suggestion below but change the extension (raw) according to your files
S = dir('**/*.raw');
[m,n] = size(S);
for ci = 1:m
folders{ci} = S(ci).folder;
filenames{ci} = S(ci).name;
end
Mathieu NOE
2022 年 4 月 25 日
if you have all your files starting with "tempo"
you can also try with :
S = dir('TEMPO*.*');
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!