Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

ls (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: support

Requires: MathScript RT Module



c = ls

c = ls(a)


Lists all files in a directory. ls(a) is equivalent to dir(a). If you do not specify a, this function returns the current working directory.




Name Description
a Specifies the directory for which you want a list of files. a can include regular expressions. a is a string.


Name Description
c Returns a list of the files in a. c is a string.


If you use this function in a stand-alone application or shared library and do not specify an input, LabVIEW returns a list of all files in the directory where you installed the application or shared library. (Real-Time Module) If you deploy this function to an RT target and do not specify an input, LabVIEW returns a list of files in the directory given by the Default Data Directory VI.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT No (affects entire script)


% Lists all VIs in the working directory
C = ls('*.vi')

Related Topics



Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit