How to open a folder in local computer by robot?

Hi All,

I want to open a folder which is located in local computer.How can we do that?

Lets say I want to give the folder path (C:\Users\Tom\Documents\UiPath\BlankProcess) to the robot and robot should open the file which is redirecting to the given path.

Appreciate your support on this.

Use For each Activity…
For each Item Provide folder Path Like
Directory.GetFiles(“Path”)

2 Likes

@SachiniJ Why do you want to open the Folder ? Are you performing any operations after the Folder is Open or Do you want only to Open the Folder ?

Hi @supermanPunch ,

I want to open a folder and get names of existing folders inside that

@SachiniJ Then you don’t actually need to open the Folder, You can use this in an Assign Activity to get the Folder names inside a Folder :

strArray = Directory.GetDirectories(yourFolderPath)

3 Likes

hi @supermanPunch,

Used this now and now I’m getting absolute path of the folders.But I need only the folder names. Do you have any idea how can we archive this?

Cheers!!!

1 Like

@SachiniJ Can you tell me the Operations that you are performing now?
You might just need to use a Split Method for the full path Folder names that you get.

@supermanPunch

Inside the folder I want to get all the names of folders which are existing.
Folder name format will be ‘’.
I need to get the folder name which is having closest future date to the current date.

@SachiniJ The Folder name Format is Not Clear :sweat_smile:

Assuming you are using a For Each Loop to get the Folder Path names inside of the Folder.

Try using this Statement inside a Message Box inside the For Each Loop :

Split(folderPath,“")(Split(folderPath,”").Count-1).ToString

This hould give you only the Folder Name

@supermanPunch Sorry for that :slight_smile:

Folder name format will be as below.

‘2020-02-12_Invoices’ .

Ok, I will look into your solution . Thanks in advance

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.