This activity is employed to retrieve various information about a specific file, such
as its creation date and time, access time, hidden status, modified time, read-only
status, size, size on disk, file type, and user permissions. It's possible to obtain
file information from a shared folder as well, assuming access permissions are
granted.
Technical Reference
INPUT |
FilePath: This parameter specifies to provide the “Path” of the input file to extract the information against it. You can either hardcode the values in the “String” variable or pass the values as “String” datatype.
This parameter accepts values in “String” datatype. |
|
MISC |
Display Name: Displays the name of the activity. The activity name can also be customized to help in troubleshooting. |
|
SkipOnError: Specify the Boolean value as “True or False.” |
||
Version: It specifies the version of the FS automation feature in use |
||
OUTPUT |
AccessTime: This parameter enables you to retrieve the last accessed time of the file. It accepts the "DateTime" data type. The output value will display the accessed date and time in a 12-hour format. |
|
CreatedDateAndTime: This parameter helps you retrieve the "Date and Time" when the folder was created. It accepts the "DateTime" data type format. The output of the DateTime will be in a 12-hour format. |
||
Hidden: It helps to identify whether the file is hidden or not. It accepts the "Boolean" data type. |
||
ModifiedTime: This parameter enables you to retrieve the "Date and Time" when the file was last modified. It accepts the "DateTime" data type format. The output of the DateTime will be in a 12-hour format. |
||
ReadOnly: This parameter helps you determine whether the file is in read-only mode or not. It accepts the Boolean data type. |
||
Size: To view the size of the folder, utilize the variable here which is of "Int64" data type. The output value is displayed as numbers. |
||
SizeOnDisk: To observe the size on the disk, utilize the variable here which is of "Int64" data type. The output value is displayed as numbers. |
||
TypeOfFile: This parameter helps you identify the type of the provided file. It accepts the "String" data type. |
||
UserPermission: To view the permissions a user has for this specific folder, utilize this variable which is of "DataTable" data type. This can be displayed using a "TableViewer" activity. |
* Represents mandatory fields to execute the workflow
Let’s see how this activity works,
1. Create a new solution or use an existing solution.
2. Drag and drop a “GetFileInformation” activity to the workflow and set it as
start node.
3. Double-click on the activity and input the path of the file for which we need
to retrieve information.
4. In this case, I intend to obtain the file size details. Thus, I am navigating
to the “Size” in the output section of properties section to declare a
variable.
a. Here, I am going to get the details of the size of the file.
b. There are 2 methods to create a variable.
c. Method 1: Double-click on the variable parameter “Result” in the “Output”
section and enter a name that helps you easily identify it in the flow. Here,
I'm using the name "FileSize" and using the shortcut key "Ctrl+Q" to create
the variable.
d. Method 2: Click on the variable pane, enter your preferred name
(here, I'm using "FileSize"), and choose the data type as "Int64" since the
output value accepts the Integer 64 data type.
5. You can add a “Writelog” activity to view the results.
6. Now, Execute the workflow.
Below is the sample of the output of the activity.
Click here to see how the activity works in a workflow.