Rename PDF File name while downloading it from an email

Hi,
I am trying to download a PDF file from an email and Rename the pdf file.
So anyone please suggest me how can we rename a random PDF file.

Later I need to extract the PDF data using Read pdf by OCR.

2 Likes

@pratyusha_gandham

Use save Attachment Activity to save the attachments.

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

It will give array of PDF files as output. Then use For Each loop Activity to iterate that PDF files and then use Move File Activity to rename the file.

Hi @pratyusha_gandham,

Use move activity, just search for it in activities.
Use file path were you got it from and then destination were the file will be located.
Example:
C:\example.pdf
C:\renamedExample.pdf

image

For your reference:
https://activities.uipath.com/docs/move-file

Hi @pratyusha_gandham

When using right click to save the file you will get save dialog popup window use type into activity and rename the filename and do the manipulations

Thanks
Ashwin.S

1 Like

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