Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> Files : Input/Output functions > listfiles


list files

Calling Sequence

files= listfiles(paths [,flag,flagexpand])



a string matrix giving a set of pathnames (eventually ended by a pattern built with *)


boolean optional parameters. (default value %t).


a string matrix.


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.


Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:23:43 CET 2011