func X3.EN_FILE_LIST_FILES(Char SERVER_IN, Char PATH_IN, Char SORT_IN, Char FILTER_IN, Char() FILES_OUT) : Integer

List files in a directory on the server

  • SERVER_IN Char Server on which to list the directory (or "" if current runtime)
  • PATH_IN Char Full path or volume to the directory to list
  • SORT_IN Char Sort order on files (default: N):
    • N : Alphabetical name
    • E : Alphabetical extension
    • S : Size
    • DC : Creation date
    • DA : Last access date
    • DW : Last write date
    • - : (To be put in front of the chosen type in order to have a descending sort)
  • FILTER_IN Char Possible filter on file names (see pat() function)
  • FILES_OUT Char() Array variable that will contain the files found (limit of 32767 files)
Return Integer Number of files found
Example

func X3.EN_FILE_LIST_FILES("", filpath("tmp",'',''), "-N", "*.tst", MYLIST))
Returns in MYLIST all the files whose extension is ".tst" in the tmp directory in descending order of name