How to find multiple pdf name and read?

I have 3 multiple pdf…how can i find pdf name and pdf name?

@suneel070

Sorry I did not get you. Could you please tell more details. Sheet name ?

  1. strPDF [ ] = Directory.GetFiles(“FolderPath”,“*.pdf”)

  2. use For Each loop activity iterate that string array.

                      ForEach item in strPDF
                           WriteLine -  Path.GetFileNameWithoutExtension(item)
    
2 Likes

sorry…pdf name?

@suneel070 if they are in a particular folder then follow this process
-use directory.getfiles(“path of the folder”) give you output as array of string say outstr
-use for each give input as outstr and change the out argument as string.
-inside body in assign activity give like **path.getfilename(item)**it will give you the file name.
-and coming to your second query i didn’t get what the sheet name in pdf plz elaborate

@suneel070

Have you tried my solution as mentioned in above post ?

yes…thanks…again i have iterating each pdf…now i want to read seperate -separate read each file…how can i do that in process???

1 Like

Hi

First step is to read the folder location with the assign as preciously mentioned. The To variable will be an array of strings.
Second step is to use a for each. Change the type of the argument (Properties Pane) to string. The Values field for this for each will be filled with the array of strings variable.
Inside the body of the for each you can put a PDF Read (UiPath.PDF.Activities) with as output a string variable.

Now the robot will read every pdf inside the folder. Everything that needs to be done with the text should be added inside the body of the for each.

It is very similar to what @venkatmalla6 said.

1 Like

Ok… Each pdf will be read by robot… But all pdf have different-different readable data… I want to scrap so how I do that¿?

How different is the readable data? Do they always start after a certain word and end with the same word? For example: First word of the DataTable is Itemno. and last word of the Datatabke is Total. If that is the case, then it is a solid solution to use regular expressions.

There is also a beta to read invoices now, so maybe that will be a solution in the short future.

its a different data…suppose one pdf data “Product id ,Dimension no” and second pdf have data"Manufacturing Item no" …in this loop the pdf file will iterate…How can robot will use to find this data???