| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
| External commands | YES | NO | NO | Windows,Linux |
Note: The flag is set according to whether Omnis was able to make a call to this external command.
This command returns a list of files in a directory or folder.
To list only files of a specified type, specify the file-type, which is a wildcard, such as *.LBS.
If you omit the file-type, the command returns the names of all the files.
You specify the list with list-name. The list must have a column defined as list-column-name, where list-column-name is the name of a variable. This column will receive the names of the files found under the specified path-name, including the extension.
On Windows, you can also supply the 8.3 parameter. This defaults to kFalse. If you pass kTrue, then Get files returns the 8.3 name equivalent to any long file names.
It returns an error code (See Error Codes), or zero if no error occurs.
The following example uses Get files to build a list of all the libraries in the folder returned by sys(10).
DolFileList.$define(lFileName)
# get the path of the examples folder in the studio tree
CalculatelPathnameascon(sys(115),'welcome',sys(9),'examples')
# return the list of all example librariesGet files(lFileList,lFileName,lPathname,'*.lbs')ReturnslErrCode