To obtain a list of filenames in a specific directory, use the Files In Directory command.
names = Files In Directory( path, <recursive> );
{ "2D Gaussian Process Example.jmp", "Abrasion.jmp", ... "Design Experiment", "Detergent.jmp", ... }
Notice that the files within the Design Experiment subdirectory are not included. And only files in the root $SAMPLE_DATA directory are listed.
To get the full pathnames, recurse the directories and concatenate the file paths and file names. The following example loops through each file in the $SAMPLE_DATA directory and subdirectories. The file path is concatenated to each file name.
The Files in Directory command accepts native and POSIX paths, as well as paths using path variables. See “Path Variables” on page 129 in the “Types of Data” chapter for details on working with paths.