Open PDF files in folder

I have 2 files (Name_1,Name_2) in a folder. I want to scrpae data from the files. So, the first stepis to open these PDF files. Ihave got the for loop working but I am not able to open these files. Please let me know how toopen files in UiPath

1 Like
  1. First Try:

Open Application activity

  1. If 1 doesn’t work , try

StartProcess activity and then AttachWindow

1 Like

StartProcess Works !!

1 Like

Probably Open Application contains the name of the file in the selector. If you wildcard that name with * or other suitable selector it will work.

You may also iterate between the files that has been founded in the folder like the example below:

So, for each file founded you can do whatever you want with that.


Hi Could you expand on this a little please. I’m stuck and would appreciate it very much.
I’m trying to open all pdf’s in a folder with ABBYY. So I assign RelFiles = directory.GetFiles(“Path”, “*.Pdf”)
Then I use a For each block (changing the type argument to string), Foreach item in RelFiles-
The use either open application or start process into attach window.
I’m not clear on what to put into the input tab in the properties pane for open app or start process. and the activities guides haven’t helped either. at the moment they wont even open ABBYY
Anyone Plz help,

Pass forEach item.

Cheers, Got it going now, thanks!


You can also use below file,
Test.xaml (8.6 KB)

1 Like

If a folder Contain .doc,.docx,.jpeg,.png,.jpg,and .pdf file and we need to open only .pdf file then what should we do ?


Use this to get only pdf file paths

Then follow this ,Open PDF files in folder - #7 by ddpadil

Dominic :slight_smile:

1 Like

But The Folder Contain 3 .pdf File and we want to open all 3 pdf file then ?

@kirtiSagar, Since you are running for each row. Start Process will be executed thrice (as per your requirement). Hope it meet your demands

Dominic :slight_smile:

Hi ddpadil,

I want to know how can I close the pdf file when I open it, thank you


I keep getting this error for my For Each activity: For each: Unable to cast object of type ‘System.Char’ to type ‘System.String’.

can you help with this?