4D v16.3DOCUMENT LIST |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
DOCUMENT LIST
DOCUMENT LIST
The DOCUMENT LIST command populates the Text array documents with the names of the documents located at the location you pass in pathname. Note: You must pass an absolute pathname in the pathname parameter. By default, if you omit the options parameter, only the names of documents are returned in the documents array. You can modify this by passing, in the options parameter, one or more of the following constants, found in the System Documents theme:
Notes:
If there are no documents at the specified location, the command returns an empty array. If the pathname you pass in pathname is invalid, DOCUMENT LIST generates a file manager error that you can intercept using an ON ERR CALL method. List of all documents in a folder (default syntax): DOCUMENT LIST("C:\\";arrFiles) -> arrFiles: List of all documents in a folder in absolute mode: DOCUMENT LIST("C:\\";arrFiles; Absolute path) -> arrFiles: List of all documents in recursive (relative) mode: DOCUMENT LIST("C:\\";arrFiles;Recursive parsing) -> arrFiles: Text1.txt Text2.txt \Folder1\Text3.txt \Folder1\Text4.txt \Folder2\Text5.txt \Folder2\Folder3\Picture1.png List of all documents in recursive absolute mode: DOCUMENT LIST("C:\\MyFolder\\";arrFiles;Recursive parsing+Absolute path) -> arrFiles: List of all documents in recursive Posix (relative) mode: DOCUMENT LIST("C:\\MyFolder\\";arrFiles;Recursive parsing+Posix path) -> arrFiles:
See also
|
PROPERTIES
Product: 4D HISTORY
Created: 4D v6 ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||