- Scilab help
- Files : Input/Output functions
- basename
- chdir
- copyfile
- createdir
- deletefile
- dir
- dirname
- dispfiles
- fileext
- fileinfo
- fileparts
- filesep
- findfiles
- fprintf
- fprintfMat
- fscanf
- fscanfMat
- fullfile
- fullpath
- get_absolute_file_path
- getdrives
- getlongpathname
- getrelativefilename
- 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
- newest
- pathconvert
- pathsep
- pwd
- removedir
- rmdir
- save_format
- scanf
- scanf_conversion
- sscanf
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
ls
show files
Calling Sequence
ls path options files=ls( [path] )
Arguments
- path
a string matrix giving a directory pathname (eventually ended by a pattern built with
*
). Default value is.
- files
a string column vector. By default it contains a column formatted output. if one of the option is
'-1'
.files
contains an entry for each files
Description
ls
can be used to list the files which match
the patterns given by the path argument.
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/modules/core/macros/*.sci
is a valid
pattern for both unix and windows.
If you want to get a vector of all files matching a pattern use preferabily the listfiles or the dirfunction.
Please note that starting from the version 5.0 of Scilab, the second input argument has been removed (a sequence of strings which can be added under Unix systems: the Unix ls command options). This option has been removed mainly for security and portability reasons.
Examples
ls ls SCI/modules/core/macros/*.sci x=ls('SCI/modules/core/macros/*.sci')
See Also
<< listvarinfile | Files : Input/Output functions | maxfiles >> |