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:

  1. If the size is less than 1 mb, a value in b/kb is returned normally (example: 10 b or 967 kb).
  2. 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

  1. Field "File". Path to the file whose information is to be retrieved.

Output parameters

Result          

  1. Name - The name of the specified file.
  2. Extension - The extension of the specified file.
  3. Name with extension - The name of the specified file with extension.
  4. Size - The size of the specified file. It is read in kilobytes.
  5. Date of creation - The date the specified file was created.
  6. Date of change - The date the specified file was modified.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
FileThe path to the file to get information about.Robin.FilePath
Yes
Results
NameThe name of the specified file.Robin.String

ExtensionThe extension of the specified file.Robin.String

Name with extensionThe name of the specified file with the extension.Robin.String

SizeThe size of the specified file. It is calculated in kilobytes.Robin.Numeric

Date of creationDate of creation of the specified file.Robin.DateTime

Date of changeThe 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

  1. Move the "Get file info" action to the workspace.


  2. Set the action parameter of "Get file info". 


  3. 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.

  • Нет меток