new_filelist
The new_filelist method creates an instance of the CFileList class. This is a non-class version of the CFileList:new method. You must call new before using any class methods or properties. Use the Next method to iterate over the file list, fetching the names of each file from the list.
F = new_filelist() Creates a new object. Using this constructor, you must call Open before fetching files from the filelist. F = new_filelist( sFileName ) Creates a new CFileList object and opens the file list from sFileName. The file name must include a complete path specification. F = new_filelist( CFileList_Object ) Creates a new CFileList object by copying the properties of the existing CFileList_Object. |
Three overloads are provided for this method. If you use the default constructor with no arguments, then Open must be called to open the file list from a file. If the file name is specified, the file list is opened and set to the beginning of the file. If another CFileList object is specified, then it is copied into the curent CFileList. Note that Next returns the next file name as a string, so you should not hide its return value by using it as a loop counter.
The following script lists files from a file list in the file sFileName:
|
-- Create a new CFileList from the file sFileName |
|
-- step through the files |
|
-- list the next file name |
|
|
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.