История страницы
...
1.Select the "Do While" action from the "Basic ActionsBase actions" action group and transfer it to the script.
...
- Create a variable "Counter", variable type - number.
Create a variable "Value", variable type - object.
Move the "Folder list" (action group "File system"),"Do While" (action group "Base actions") actions to the workspace.
- Set the "Folder list" action parameters:
- In the "Folder" parameter specify the path to the folder with subfolders.
- In the "Objects type" field select "Only folders" value from the dropdown list.
- Set the "Do While" action parameters:
- Use the expression construction tool to write the condition "The length of the collection obtained as a result of the "Find file" action is 0" into the condition parameter. To do this, create one more variable "Additional variable", in which the number 0 will be written.
ПримерExample:
- Add actions "Get value by index" (action group "Collections"), "Convert data" (action group "Base actions"), "Search file" (action group "File system") and "Addition" (action group "Operators") to the loop body.
- Use the expression construction tool to write the condition "The length of the collection obtained as a result of the "Find file" action is 0" into the condition parameter. To do this, create one more variable "Additional variable", in which the number 0 will be written.
Set the "Get value by index" action parameter:
- "Collection" parameter - "Folder list" action result.
- "Index" parameter - "Counter" variable.
- "Result" parameter - "Value" variable.
- Set the "Convert data" action parameter:
- "Source" parameter - "Get value by index" action result.
- "Data type" parameter - path to file.
- Set the "Find file" action parameters:
- "Folder path" parameter - "Convert data" action result.
- "File name" parameter - name of the needed file.
- Set the "Addition" action parameters:
- The first addendum - "Counter" variable.
- The second addendum - 1.
- Result - "Counter" variable.
- Click "Start" in the top panel to start the robot.
...
Обзор
Инструменты контента