What does dir(cd) stand for?
files = dir(cd);

1 件のコメント

Stephen23
Stephen23 2023 年 7 月 28 日
Note that the simpler approach call only one function, not two:
files = dir('.');

サインインしてコメントする。

 採用された回答

Cristian Garcia Milan
Cristian Garcia Milan 2020 年 5 月 22 日

0 投票

dir is a function that takes a look in a determined folder (and subfolder if you command).
cd without arguments is your actual location
dir(cd) would bring you all the files in your actual location.
files = dir(cd);
Will return a struct with name of the file, folder,a boolean value about if it is a folder or not, and its modification date.
Hope it helps!

1 件のコメント

Ani Asoyan
Ani Asoyan 2020 年 5 月 26 日
Thank you !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で File Operations についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by