Summary
The list of files that exist in the specified folder is written in the Internal Device. Parameter 1 indicates the CF Card data folder. Parameter 4 indicates the offset used to select a file/files within that folder. Parameter 3 indicates the number of files selected within that folder. Parameter 2 specifies the LS Area into which the files will be written. When the offset is specified as "0", the list starts from the first (starting) file.
Format
_CF_dir/_USB_dir (folder name, save in addresses, number of files, offset)
Parameter 1
Folder name: Fixed string (Maximum length is 32 single-byte characters)
Parameter 2
Write-To Address: Internal Device, Internal Device designated with offset
Parameter 3
Number of file names: Numeric Value, Device address, Temporary address (Maximum length is 32)
Parameter 4
Offset: Numeric Value, Device address, Temporary address
Example expression:
To output a file list containing two files when the offset is 1 (second file):
_CF_dir ("\DATA\*.*", [w:[#INTERNAL]LS0100], 2, 1)
When the statement above is executed while the following files exist in the DATA folder, file names "DATA0001.BIN" and "DATA02.BIN" are written to LS0100 and later areas.
When the offset is specified as "0", the list starts from the first (starting) file.
Only the 8.3 format (a maximum of 12 characters, with 8 characters for the file name, the period, and 3 characters for the extension) can be used for the file name. You cannot use file names longer than 12 characters.
If the specified folder does not have enough files as specified, the remaining LS Area is filled with NULL characters ('\0').
If a file name has fewer than 12 characters, the empty positions are filled with NULL characters ('\0').
When defining a folder name, make sure you use "*.*", such as "\DATA\*.*". The asterisks *.* mean to display all files.
The number of files actually listed is written in CF Card/USB Storage Listed Files [s:CF_FILELIST_NUM]/[s:USB_FILELIST_NUM].
For more details, see 21.11.5.1 Label Settings.
Write-To LS Addresses are not counted as D-Script Addresses.
The file names are not sorted when they are written into the LS Area. They are written in order of creation (the order of FAT entry).
You can create the list by specifying a file extension. To list files that match the file extension: "DATA\*.BIN". However, you cannot use "*" within a file name.