Get file info Version 12 (net)
Action group: File system
Description
This action is used to get the properties of a file.
The "Get file info" action returns the file size based on the principle:
- If the size is less than 1 mb, a value in b/kb is returned normally (example: 10 b or 967 kb).
- If the size is more than 1 mb, the value is always rounded down. For example: if the file size is 10.88 mb, the result is 10 mb.
Action icon
Parameters
Input parameters
- Field "File". Path to the file whose information is to be retrieved.
Output parameters
Result
- Name - The name of the specified file.
- Extension - The extension of the specified file.
- Name with extension - The name of the specified file with extension.
- Size - The size of the specified file. It is read in kilobytes.
- Date of creation - The date the specified file was created.
- Date of change - The date the specified file was modified.
Settings
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
File | The path to the file to get information about. | Robin.FilePath | Yes | |
Results | ||||
Name | The name of the specified file. | Robin.String | ||
Extension | The extension of the specified file. | Robin.String | ||
Name with extension | The name of the specified file with the extension. | Robin.String | ||
Size | The size of the specified file. It is calculated in kilobytes. | Robin.Numeric | ||
Date of creation | Date of creation of the specified file. | Robin.DateTime | ||
Date of change | The date the specified file was modified. | Robin.DateTime |
Special conditions of use
None.
Example of use
Task
Get the size of the "Log.txt" file.
Solution
Use the "Get file info" action.
Implementation
- Move the "Get file info" action to the workspace.
- Set the action parameter of "Get file info".
- Click on the "Start" button in the top panel.
Result
The program robot worked successfully. The action returned 6 file properties: "Name", "Extension", "Name with extension", "Size", "Date of creation", "Date of change". The file size is specified without unit and is calculated in kilobytes.
Обзор
Инструменты контента