История страницы
...
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Папка - путь к папке, содержимое которой нужно получить. Например: C:\Users\qrupl\Desktop\Test
Тип объектов - тип объектов, которые будут получены из указанной папки. Доступные варианты: Все, Только папки, Только файлы.
Использовать рекурсию - при значении логической переменной = true, будут считаны все пути до вложений в выбранной папке и каждой вложенной в нее. При значении логической переменной = false, будут считаны пути до вложений только в выбранной папке.
Тип сортировки - способ, с помощью которого будет отсортировано результирующее значение. Доступные значения выпадающего списка: По имени, По размеру, По типу, По дате создания, По дате изменения. В результате сортировки будет получена коллекция с отсортированными значениями.
Порядок сортировки - способ, с помощью которого будет упорядочено результирующее значение. Доступные значения выпадающего списка: По возрастанию, По убыванию.
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: Скрытые файлы - при значении "true" скрытые файлы тоже будут выведены. Подробнее про просмотр скрытых файлов: 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.
Настройки
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Folder | Path to the directory, whose content should be returned | Robin.FolderPath | C:\doc\img | Yes |
Objects type | Nested elements, the paths to which will be included in the resulting collection. Default «All» | Robin.String | No | |
Sort type | The method by which the resulting value will be sorted. The default is to sort by name. | Robin.String | No | |
Sorting order | The way in which the resulting value will be ordered. The default is ascending order. | Robin.String | No | |
Hidden files | If set to «true», hidden files will also be displayed in the result. | Robin.Boolean | true | No |
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 | Robin.Boolean | true | No |
Results | ||||
Result | List of every nested element path | Robin.Collection |
Особые условия использования
- Сортировка возможна по имени, размеру, типу, дате создания и дате изменения объектов.
- Также выбранный способ сортировки может упорядочить содержимое папки по возрастанию или по убыванию.
- Если пользователь решит не использовать сортировку, в результате содержимое папки будет отсортировано по имени объектов по возрастанию.
- Если выбран способ сортировки, но не выбран порядок по убыванию/возрастанию, то по умолчанию действие отсортирует по возрастанию.
- Если выбран порядок по возрастанию/убыванию, но не выбран способ сортировки, то по умолчанию действие отсортирует по имени объектов в выбранном порядке.
- Есть возможность вывода скрытых файлов в результат.
- Если к папке отсутствует доступ - робот возвращает ошибку.
- Если при рекурсии отсутствует доступ к какой-либо папке/файлу - робот возвращает ошибку.
- Если при сортировке отсутствует доступ к просмотру информации о некоторых файлах/папках, то они выводятся ниже других файлов/папок в результирующей коллекции.
- При сортировке по дате создания, дате изменения и размеру - папки выводятся в конце списка.
Пример использования
Задача
В папке "RPA" расположены папки. Необходимо получить коллекцию всех путей до всех папок и путь до папки из коллекции с индексом 0.
Решение
Special conditions of use
- Sorting is possible by name, size, type, creation date and modification date of objects.
- Also, the selected sorting method can organize the contents of the folder in ascending or descending order.
- 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.
- If a sorting method is selected, but no descending/ascending order is selected, the action will sort ascending by default.
- 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.
- It is possible to display hidden files in the result.
- If the folder is not accessible, the robot returns an error.
- If there is no access to any folder/file during recursion, the robot returns an error.
- 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.
- 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
- Assemble a robot scheme with the actionsСобрать схему робота, состоящего из действий:
- Настроить параметры действия Set the "Folder list" action parameters.
- Настроить параметры действия Set the "Get value by index" action parameters.
- Нажать на кнопку Click "Старт" в верхней панели.
Результаты
- Start" in the top panel.
Result
The program robot completed successfully.Программный робот отработал успешно.