Skip to main content

Get File Info

AutomatR.DefaultActivities.FileAndFolder.GetFileInfo

The "Get File Info" activity in AutomatR is designed to fetch information about a specified file on the local drive. This activity is part of the File and Folder activities package, providing users with details such as file size, name, last modified timestamp, etc.

Properties

NameDescription
Input
File PathSpecifies the full path of the file on the local drive for which information is needed. String variables containing the file path or the result of a file selection.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. Enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get File Info" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the wait time is 1000 milliseconds or 1 sec, i.e., 1.
Output
File InfoOutputs the file information as a FileInfo object. The FileInfo object contains details such as size, name, last modified timestamp, etc. Variables of type FileInfo to store the file information.

How to use:

  1. Drag and drop the "Get File Info" activity onto the workflow.
  2. Configure the properties by specifying the file path for which information is needed.
  3. Optionally, configure the delay.
  4. Execute the workflow to retrieve information about the specified file.

Example: Consider an example where the "Get File Info" activity is used to fetch information about a file named "file.txt" located in the "D:\getFileInfo\" directory:

Get File Info:
File Path: "D:\getFileInfo\file.txt"
Result: fileInfoResult

In this example, the activity fetches information about the "file.txt" file, and the result, including details like size, name, and last modified timestamp, is stored in the fileInfoResult variable for further handling in the workflow.