Get Folder Information- FS Automation

This activity is utilized to retrieve specific information about a particular folder, such
as its creation date and time, contained files and folders, sharing status, folder size,
disk space usage, and user permission settings. The folder information for a shared
folder can also be extracted if we have access to the same.

 

INPUT

FolderPath: This field indicates the path of the folder for which information needs to be retrieved. Alternatively, a variable containing the path details can also be passed here

 

 

 

 

 

 

 

 

 

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.

 

Let’s see how we can use this activity.

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

2.      Drag and drop the get folder activity.

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

3.      Navigate to the property section and declare a variable in the output box. There are lot of
choices here, and here we are going to retrieve the information of the files present in the folder.

a.      Declare a variable in the “Files” section of the output box. Here it is “fi”.

b.      The files are stored in a list of string datatype, which can be used to get the
name of each file.

4.      Drop a “Writelog” activity below the “GetFolderInformation” to view the information of the files
present in the folder.

 

         

     

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