Borrar filtros
Borrar filtros

dir(cd)

8 visualizaciones (últimos 30 días)
Ani Asoyan
Ani Asoyan el 18 de Feb. de 2020
Comentada: Stephen23 el 28 de Jul. de 2023
What does dir(cd) stand for?
files = dir(cd);
  1 comentario
Stephen23
Stephen23 el 28 de Jul. de 2023
Note that the simpler approach call only one function, not two:
files = dir('.');

Iniciar sesión para comentar.

Respuesta aceptada

Cristian Garcia Milan
Cristian Garcia Milan el 22 de Mayo de 2020
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 comentario
Ani Asoyan
Ani Asoyan el 26 de Mayo de 2020
Thank you !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by