Skip to main content
Roberty Studio
RPAFile Management

Reading files in directories

Reading files in directories

Lists all the file names inside a specified folder. Useful for batch processing every file available in a directory.


Options​

Folder path​

Enter the full path of the folder whose files will be listed. Example: C:\Desktop\Reports.

Recursive reading?​

Defines whether the action must also list the files contained in subfolders. The options are:

  • Yes: Lists the files of the folder and of every subfolder.
  • No: Lists only the files of the root folder specified (default).

Return files full path?​

Defines whether the return must contain the full path of each file or only the name. The options are:

  • Yes: Returns the full path (e.g. C:\Desktop\Reports\file.txt).
  • No: Returns only the file name (e.g. file.txt) (default).

Returns​

Javascript code​

js
actions["action-id"].values // list of files (List)
actions["action-id"].count // number of files (Number)

Field selection​

  • values — list of files (List)
  • count — number of files (Number)

Rules and Conditions​

  • The Folder path field is required.
  • The folder indicated must exist and be accessible by the robot.
  • If the folder is empty, the list returned is empty and the count is zero.
  • Recursive reading may be slow in directories with many sublevels.