Get files

Retrieves cell array of file names from current directory
654 descargas
Actualizado 13 nov 2009

Ver licencia

[Sacs] = getFiles(varargin);
This function returns a cell of file names from the current directory, given any number of inputs of regular expressions. It is analogous to the LINUX 'ls' command, but the output is given to the user as a cell, when using getFiles.m

USAGE
[Sacs] = getFiles('REGEXP1','REGEXP2',...,'REGEXPN');

INPUT
REGEXP1: A character regular expression, such as 'get' or 'mat'.

OUTPUT
Sacs: A cell array containing the file names that match the
requested character matches.

EXAMPLES
Suppose you have a directory where JPEG images are stored under names that include 'November' somewhere in the title. This returns those file names:

[Sacs] = getFiles('November','.jpg');

Suppose you have directory containing data of the form:
STATION.CHAN.YEAR.DAY.HR.SAC
The following command returns all .SAC files for station 'JAN', channel 'EPZ', Julian day 340, and year 2009:

[Sacs] = getFiles('SAC','JAN',340,2009);

Citar como

Joshua Carmichael (2024). Get files (https://www.mathworks.com/matlabcentral/fileexchange/25828-get-files), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2009b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre File Operations en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0