GetSubFolders

The GetSubfolders component retrieves all the folders, including hidden folders, in the specified directory.

Screenshot

Ports

The GetSubfolders component exposes the Control In, Control Out, Data In, and Data Out ports by default.

Port Description
ControlIn Must be connected to the Control Out port of one or more components.
ControlOut Can be connected to the Control In port of another component or the default end component.
Data In The GetSubfolders component exposes the following Data In ports by default:
directoryPath: specifies the path of the directory whose subdirectories and files are to be retrieved(string).
searchSubDirectories: specifies if Intellibot must search the subdirectories of the specified directory (Boolean). The default Boolean value is “True”. If you do not want the subdirectories searched, you can change the value to “False”.
Data Out Returns the names of all the subdirectories and files in the specified directory (ReadOnlyCollection’1).

Properties

To edit the properties of the GetSubfolders component, in the Properties window, change the required property. You can edit the following properties.

Property Description
Search Search for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the action is performed.
Delay Before Execution Specifies the wait time (in seconds) before the action is performed.

Example

Let us consider an example.

Screenshot

To retrieve the path to a system special folder:

  1. In the Toolbox, expand Utilities and then expand Directory.
  2. Drag the GetSubFolders component and drop it on the Design surface.
  3. Double-click the directoryPath box and enter the path of the required directory.
  4. To override the existing data source, right-click the directoryPath box.
  5. Click Override and change the data source.

    Note

    To learn more about overriding the data source of the data port, refer the Override section.

  6. To override the default Boolean value of the searchSubDirectories Data In port, if required:

    • Right-click the searchSubDirectories box.
    • Click Override.
      The PORT PROPERTIES dialog box is displayed.
    • In Read Data From, select Static.

    Note

    In Read Data From, you can select Connection or Variable instead of Static. To learn more about the Connection or Variable data source override options, refer the Override section.

    • In Static Value, click the drop-down arrow and select “False”.
    • Click OK.
      The Design surface displays the process flow.
  7. Add the For Each component to retrieve the Sub Folders in an order.

  8. In the Toolbox, expand Loops.
  9. Drag the For Each component and drop it on the Design surface.
  10. In the Toolbox, expand General.
  11. Drag the Show component and drop it on the Design surface
  12. Connect all the control ports in the activity.
  13. In the toolbar, click Run. The names of all the folders and files in the specified directory are retrieved.