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
Name | Description |
---|---|
Input | |
File Path | Specifies 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 Name | Provides 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 | |
Delay | Specifies 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 Info | Outputs 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:
- Drag and drop the "Get File Info" activity onto the workflow.
- Configure the properties by specifying the file path for which information is needed.
- Optionally, configure the delay.
- 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.