Reading files with extension.

I'm using:
A = dir(uigetdir('C:\','Select directory of a files'));
What can I use instead of fullfife() to load only files with file extension *.a ? In this line to have absolute file names?
Thank You.

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 7 de Feb. de 2013

1 voto

A = dir([uigetdir('C:\','Select directory of a files'),'/*.a']);

3 comentarios

ZK
ZK el 7 de Feb. de 2013
Thank You it's working but still I don't have absolute file names, fopen returns me -1, is there any solution for this?
A = dir([uigetdir('C:\','Select directory of a files'),'/*.a']);
filename={A.name}
ZK
ZK el 8 de Feb. de 2013
Sorry I have still -1 fid. I wish to use after it this loop:
for k=1:length(A);
Ap=A(k).name
fid = fopen(Ap, 'r');
end

Iniciar sesión para comentar.

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Preguntada:

ZK
el 7 de Feb. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by