Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Folder list Version 14 (Python)

Группа действий: Файловая система 

Описание

Действие получает пути до всех вложенных элементов папки

Иконка действия

Image Removed

Параметры 

Входные параметры

Action group: File system

...

Description

The action gets paths to all folder elements. 

Action icon

Image Added

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. 

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

Особые условия использования

  1. Сортировка возможна по имени, размеру, типу, дате создания и дате изменения объектов.
  2. Также выбранный способ сортировки может упорядочить содержимое папки по возрастанию или по убыванию.
  3. Если пользователь решит не использовать сортировку, в результате содержимое папки будет отсортировано по имени объектов по возрастанию.
  4. Если выбран способ сортировки, но не выбран порядок по убыванию/возрастанию, то по умолчанию действие отсортирует по возрастанию.
  5. Если выбран порядок по возрастанию/убыванию, но не выбран способ сортировки, то по умолчанию действие отсортирует по имени объектов в выбранном порядке.
  6. Есть возможность вывода скрытых файлов в результат.
  7. Если к папке отсутствует доступ - робот возвращает ошибку.
  8. Если при рекурсии отсутствует доступ к какой-либо папке/файлу - робот возвращает ошибку.
  9. Если при сортировке отсутствует доступ к просмотру информации о некоторых файлах/папках, то они выводятся ниже других файлов/папок в результирующей коллекции.
  10. При сортировке по дате создания, дате изменения и размеру - папки выводятся в конце списка.

Пример использования 

Задача

В папке "RPA" расположены папки. Необходимо получить коллекцию всех путей до всех папок и путь до папки из коллекции с индексом 0. 

Image Removed

Решение



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.

Image Added

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 "Старт" в верхней панели. 

Результаты

  1. Start" in the top panel.

Result

The program robot completed successfully.Программный робот отработал успешно.