Get File Information

This activity is used to retrieve any information that we need about a particular file like the date and time of creation, access time, hidden items, modified time, Read only items, size, size on disk, Type of file, user permission.

Technical Reference:

 

 

   INPUT

FilePath: This indicates the path of the folder from which the information has to be retrieved.

 

 

 

 

 

 

 

    MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

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

 

 

 

 

 

 

 

 

 

 

 

 

  OUTPUT

AccessTime: Declare and assign a variable to get the last accessed time of the file. This is not a mandatory field however to get the output declare a variable here.

CreatedDateAndTime:  Declare and assign a variable to get the created date and time of the file. This is not a mandatory field however to get the output declare a variable here.

Hidden: Declare and assign a variable to get the hidden items in the file. It returns as true if there is any hidden item and false when there is no hidden item. This is not a mandatory field however to get the output declare a variable here.

ModifiedTime: Declare and assign a variable to get the modified time of the file. This is not a mandatory field however to get the output declare a variable here.

ReadOnly: Declare and assign a variable to know if the file is in Read only mode. It returns as true if it is in Read only mode false if it is not. This is not a mandatory field however to get the output declare a variable here.

Size: Declare and assign a variable to know the size of the file. This is not a mandatory field however to get the output declare a variable here.

SizeOnDisk:  : Declare and assign a variable to know the size of the file on the disk. This is not a mandatory field however to get the output declare a variable here.

TypeOfFile: Declare and assign a variable to get the type of the file like – docx, txt, xlsx, doc.  This is not a mandatory field however to get the output declare a variable here.

UserPermission: Declare and assign a variable to know whether the file needs user permission or not. This is not a mandatory field however to get the output declare a variable here.

* Mandatory fields to execute the workflow.

Example:

Here we are going to automate by retrieving the information from a file.

To build this process,

1.      Open a project and create a workflow.

2.      Drag and drop the Get File Information activity from FS Automation.

3.      Double click on the activity.

4.      Choose the file path from the system or enter it within the double quotes.

5.      Create a variable in any of the output tabs and press CTRL+Q to save it.  

 

6.      Drag and drop Message activity and connect below the Get File Information activity.

7.      Enter the input string as sd.ToString in the box.

8.      Enter the log level as “Info”.                                                                  

9. Now, execute the workflow.

 

The bot retrieves the information of the file and displays the same in the message box.