How to choose file instead of using directory.get files

Hi all,

How to choose specific file from local machine instead of using directory.get files. Need to select the file from the local machine , how to do this.
Please guide me on this.

@lakshmi.mp

Use for each file in folder activity

Hi @lakshmi.mp
use for each file in folder

Hi @rlgandu @pravallikapaluri , can you elaborate more on this

@lakshmi.mp

For each file in activity take the folder and loops through the files in the folder.If you want to iterate only specific files like Xlsx,pdf then you have filter option “.xlsx,.pdf”
image

Hi @lakshmi.mp

You an use For Each file in Folder for that.

image

You can specify the folder path in In Folder.
In filter expression, you can filter with extensions files like "*.txt", "*.xlsx", "*.docx", "*.xls","*.pdf".
Inside that you can use any expressions to get File Name, Entire File Path, FilePath without extension and so on.

Hope you understand!!

@lakshmi.mp

You can choose the path of the folder
you can also able to specify the group like".xlsx" or ".pdf" or"*.png"…etc in filter option
you can use an if condion to retrive specific file
Sample as below

Check this for more info

Hope it helps!!

@pravallikapaluri @rlgandu @Parvathy , I want to click specific file in a folder
manually from UiPath studio.
image
used this and output showing list of files in a folder.

@lakshmi.mp

use an if condition as shown above

@lakshmi.mp

Take if condition

CurrentFile.Name.ToString.Contains("Your File Name")

Then perform your actions

@lakshmi.mp

or Use if condition

CurrentFile.Name.contains("your filename")

Hi @lakshmi.mp

If you want to manually select the folder, use Browse For File. This will open a pop up where you can select the required file.

image

Regards

1 Like

@rlgandu @Parvathy @pravallikapaluri ,Thanks a lot for helping…

1 Like

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