- Ajuda Scilab
- Arquivos : funções de Entrada/Saída
- chdir
- fileinfo
- get_absolute_file_path
- getrelativefilename
- newest
- sscanf
- basename
- copyfile
- createdir
- deletefile
- dir
- dirname
- dispfiles
- fileext
- fileparts
- filesep
- findfiles
- fprintf
- fprintfMat
- fscanf
- fscanfMat
- fullfile
- fullpath
- getdrives
- getlongpathname
- getshortpathname
- %io
- isdir
- isfile
- listfiles
- listvarinfile
- ls
- maxfiles
- mclearerr
- mclose
- mdelete
- meof
- merror
- mfprintf
- mscanf
- mget
- mgetl
- mgetstr
- mkdir
- mopen
- movefile
- mput
- mputl
- mputstr
- mseek
- mtell
- pathconvert
- pathsep
- pwd
- removedir
- rmdir
- save_format
- scanf
- scanf_conversion
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
listfiles
list files
Calling Sequence
files= listfiles(paths [,flag,flagexpand])
Arguments
- paths
a string matrix giving a set of pathnames (eventually ended by a pattern built with
*
)- flag,flagexpand
boolean optional parameters. (default value
%t
).- files
a string matrix.
Description
listfiles
can be used to list the files which match
the patterns given by one of the paths entries.
Patterns are given to the unix ls
or to the windows
dir
commands in order to get information on files.
Thus in order to write portable Scilab script valid wildcard patterns
for both os are to be given. Note that Pathname conversion is
performed and for example SCI/core/macros/*.sci
is a valid
pattern for both unix and windows.
if flag
is true the pathnames given by paths
are
converted according to the getos() == 'Windows' value (See pathconvert
).
Moreover, if flagexpand
is true leading strings like
HOME
, SCI
or ~
are expanded using environment
variables.
Examples
files=listfiles(['SCI/modules/core/macros/*.sci';'SCI/modules/core/macros/*.bin']);
See Also
- findfiles — Finding all files with a given filespec
- basename — strip directory and suffix from filenames
- pathconvert — pathnames convertion between POSIX and windows.
<< isfile | Arquivos : funções de Entrada/Saída | listvarinfile >> |