How to get the Drive storage information using UiPath

In some cases, while designing process automation we might need to get the Drive storage info to process the further steps.

For example, the process you are designing is in a C drive, and whenever the C drive has available space greater than 10 GB, the Bot needs to process further.

How will you check the drive storage information while designing the process using UiPath is our task?

Let’s get into the practical implementation of this task:

Step1: The drive storage info that we are getting in this example is shown below:

free available space

Step2: Drag and Drop assign activity from activities panel to the designer panel and enter the code as shown below:

get the drive storage information

Here:

We are getting the drive information of F drive.

System.IO.DriveInfo is the variable type of Drive_Info variable.

Step3: Drag and Drop an assign activity from the activities panel to the designer panel and enter the code as shown below:

get the drive storage information

Step4: Drag and Drop an assign activity from the activities panel to the designer panel and enter the code as shown below:

get the drive storage information

This will give us the available free space in the drive which is provided as input.

The available free space for the F drive is shown below after executing these steps:

f drive storage

This is how we can get the drive storage information of different Drives in our local machine.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *