Folder list Version 14 (Python)

Action group: File system


Description

The action gets paths to all folder elements. 

Action icon


Parameters

Input parameters

Folder - path to the directory, whose content should be returned. Example: C:\Users\qrupl\Desktop\Test

Objects type - type of objects to be obtained from the specified folder.  Available options: All, Only folders, Only files.

Use recursion - if the value of the boolean variable = true, all paths to attachments in the selected folder and each subfolder in it will be read. If the value of the boolean variable = false, the paths to attachments only in the selected folder will be read.

Sort type - the method by which the resulting value will be sorted. Available dropdown list values: By name, By size, By type, By creation date, By modification date. Sorting will result in a collection with sorted values.

Sorting order - the way in which the resulting value will be ordered. Available dropdown list values: Ascending, Descending.

Hidden files - if set to "true" , hidden files will also be displayed in the result. More about viewing hidden files: Show hidden files and folders in Windows

Output parameters

Result - collection of every nested element path. You can get the elements of the collection using the "Get value by index" action. 

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
FolderPath to the directory, whose content should be returnedRobin.FolderPathC:\doc\imgYes
Objects typeNested elements, the paths to which will be included in the resulting collection. Default «All»Robin.String
No
Sort typeThe method by which the resulting value will be sorted. The default is to sort by name.Robin.String
No
Sorting orderThe way in which the resulting value will be ordered. The default is ascending order.Robin.String
No
Hidden filesIf set to «true», hidden files will also be displayed in the result.Robin.BooleantrueNo
Use recursionIf the value of the boolean variable = true, all paths to attachments in the selected folder and each subfolder in it will be read. If the value of the boolean variable = false, the paths to attachments only in the selected folder will be readRobin.BooleantrueNo
Results
ResultList of every nested element pathRobin.Collection

Special conditions of use

  1. Sorting is possible by name, size, type, creation date and modification date of objects.
  2. Also, the selected sorting method can organize the contents of the folder in ascending or descending order.
  3. If the user chooses not to use sorting, the result is that the contents of the folder will be sorted in ascending order by object name.
  4. If a sorting method is selected, but no descending/ascending order is selected, the action will sort ascending by default.
  5. If ascending/descending order is selected but no sorting method is selected, the action will sort by the name of the objects in the selected order by default.
  6. It is possible to display hidden files in the result.
  7. If the folder is not accessible, the robot returns an error.
  8. If there is no access to any folder/file during recursion, the robot returns an error.
  9. If there is no access to view information about some files/folders during sorting, they are displayed below other files/folders in the resulting collection.
  10. When sorting by creation date, modification date and size, folders are displayed at the end of the list.

Example of use

Task

There are folders in the "RPA" folder. Get the collection of all paths to all folders and the path to the folder in the collection with index 0.

Solution

Use the "Folder list", "Get value by index" actions.

Implementation

  1. Assemble a robot scheme with the actions:


  2. Set the "Folder list" action parameters.


  3. Set the "Get value by index" action parameters.


  4. Click "Start" in the top panel.

Result

The program robot completed successfully.

  • Нет меток