SiMX Help‎ > ‎The Target Platform‎ > ‎Objects‎ > ‎TARGET Object‎ > ‎target.file‎ > ‎


Platform Objects


Calling GetFileNames returns the file names 


Function GetFileNames(filter, options)

filter (input) - a string representing full pathname of the folder with the wild card based filter
options (input) - an optional string with hints which control how the list of files to be created and would it be sorted.
Could content the following sub-string:
  • folder - include the folder names (default is only files)
  • folder only - no files, only folders
  • system - do not skip system files
  • hidden - do not skip hidden files
  • name - sort the result by name
  • date - sort by date
  • size - sort by size
  • desc - sort in the reverse order
  • sub - recursively scan the sub-folders

Return value

Array of file names (or full pathnames if the 'sub' parameter was set)



    dim ff, i
    ff = trg.file.GetFileNames( "C:\test\" & "*.ppt*", "date desc" )
    for i = 0 to ubound(ff)
        msgbox i & ": " & ff(i)


See also

Platform Objects and Methods