loading all files from a user specified folder into a gui

Hi,
Is there a way for a GUI to allow a user to select a folder of text files on their own computer and have the GUI work on all the txt files within that folder?
Best regards
Steve

 Respuesta aceptada

Más respuestas (1)

Matt J
Matt J el 19 de En. de 2018
Editada: Matt J el 19 de En. de 2018

1 comentario

Combined with something like:
info = dir( folder );
filenames = { info.name };
[~,~,ext] = cellfun( @fileparts, filenames , 'UniformOutput', false )
txtIdx = strcmp( ext, { '.txt' } )
filenames = filenames( txtIdx )
to give you all the filenames of the desired type from the directory.

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Preguntada:

el 19 de En. de 2018

Comentada:

el 19 de En. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by