Get Folder Information

This activity helps to extracts detailed folder information, including creation date, contents,
size, and permissions. It also works for shared folders if access is granted.

Technical Reference

 

 

 

 

INPUT

FolderPath: This field indicates the path of the folder from which the information needs to be retrieved.

 

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 be customized which will help in troubleshooting.

SkipOnError: Specify the Boolean value as “True or False.”
True: Continues to execute the workflow irrespective of any error thrown.
False: Stops the workflow if it throws any error.
None: If the option is specified as blank, by default the activity will perform the “False” action.

Version: It specifies the version of the FS automation feature in use

 

 

 

 

 

 

 

 

 

OUTPUT

CreationDateTime: 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

Files: It accepts the "List of string" data type. If you want to obtain a list of files available in the specified folder, declare a variable.

Folder: It accepts the "List of string" data type. If you want to retrieve the list of folders available in the specified directory, utilize this parameter.

SharingEnabled: To determine whether sharing is enabled or disabled for the specific folder, employ the variable here which is of "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.

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 we can use this activity.

In the following example, there is a sizable folder on the system, and I will
retrieve its size to free up space using the “GetFolderInformation” activity.

1.       Create a new solution or use the existing solution.

2.       Drag and drop the “GetFolderInformation” activity and set it as start node.

a.       Double click on the activity and enter the folder path for which we
need to retrieve the information.

3.       Navigating to the “SizeOnDisk” property in the output section to
declare a variable.

a.       There are 2 methods to create a variable.

b.       Method 1: Double-click on the variable parameter “SizeOnDisk” in the
“Output” section and enter a name that helps you easily identify it in
the flow. Here, I'm using the name "Size" and using the shortcut key
"Ctrl+Q" to create the variable.

c.        Method 2: Click on the variable pane, enter your preferred name
(here, I'm using
"Size"), and choose the data type as "Int64" since
the output value accepts the Integer 64 data type.

4.       You can add the “Writelog” activity to view the results.

a.       Enter the input String as “Size.ToString” and log level as “Info”.

b.       The “.ToString” is advised to use along with any other data types other
than string format. It converts any data type into string.

5.       Now, save and execute the workflow.

Below is the sample output of the activity.

 Click here to see how this activity is used in a workflow.