Hi all, newbie here and still in the dark on how to do the following. How can I check for pdf files in a folder, open the pdf files and capture the header information (i.e. Invoice number), rename the pdf file by adding the invoice number as the prefix of the file name, moving the renamed file to a new folder. Any help is appreciated in guiding me how to do it. Thanks all…
Please follow below steps to do this.
Use below expression to read all pdf files from particular folder and will give output as array of string.
arrPdfFiles [ ] = Directory.GetFiles("input folder path","*.pdf")
Then use ForEach loop activity to iterate one by one pdf file.
ForEach item in arrPdfFiles - Use Read PDF text activity to read the pdf file and save the output in one string variable - And then use Regular expression or string manipulation functions to fetch invoice number from it. - Finally use Move File activity to move file.
Destination: “Destination folder path”+invoiceNumber+"*.pdf"
“you can use UiPath Document OCR and document understanding to extract text from PDF. Once the text is extracted you can use rename file activity.
watch this video to know exactly how to extract text using UiPath Document understanding.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.