Home > lang > rdir 
 fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
RDir

FileNameArray = RDir ( Directory AS String [ , Pattern AS String , Filter AS Integer , FollowLink AS Boolean ] ) AS String[]

Returns a string array that contains the names of files located in Directory and its sub-directories that matches the Pattern and the Filter.

The specified directory is recursed.

The pattern can contain the same generic characters than the LIKE operator. If no pattern is specified, any file name is returned.

The filter specifies what kind of files will be returned.

The filter can be one of the following values:

If Filter is not specified, all files and directories are returned.

If FollowLink is TRUE, then symbolic links on directories are recursed. Otherwise they are processed like normal files.

The file paths returned are relative to the searched directory.

Example

' Print the png image files in a directory and its sub-directories

SUB PrintDirectory(Directory AS String)

  DIM File AS String

  FOR EACH File IN RDir(Directory, "*.png")
    PRINT File
  NEXT

END

See also

File & Directory Functions