Open only pdf files

Hi,
I need your help. I saved the attachments from the emails and I need to open only pdf files.
Can you help me, please? Thanks!

@BID

Download uipath.directorysearch.activity package in that you will find Get Files Activity and in properties maintain the type of File as *.PDF

Regards,
A Manohar

1 Like

Hello,

-Save all the email attachment files into one folder
-Use Assign Activity name it has Input_Files = System.IO.Directory.getfiles(“yourpath”,"*.pdf")
-Assign to system String
-For each activity
-input_files do pdf activity whatever you want

Cheers @BID

2 Likes

@Manohar1

I downloaded the package, now where do I write the file type?

Untitled

@BID

In Filter Properties
“*.pdf”

In search Directory give the the path

1 Like

@Shriharsha_H_N

I saved all the documents in a folder, but I don’t understand how to make me open only what is pdf

@Manohar1

Thanks! And now?

Hi @BID

Please try the given custom activity which helps to return specific file type based on LIFO or FIFO order.
https://go.uipath.com/component/file-picker

@BID
1.Use for each activity…
Directory.getfiles(YourFolderPath,"*.pdf")

2.Then Use Start process activity to open pdf file.

image

@BID

in output variables pass a list variable all files will be stored into it.

1 Like

@Manohar1

I understood, thanks, but now how do I open the pdf I found? I’m a beginner, sorry!

@BID

1.Now use For each activity–>file in filesList
2.use start process and give .exe application name of pdf,in arguments give the name of file as file.

1 Like

@Manohar1

Do I create a “file” variable? If yes, what kind of variable?

Main.xaml (5.0 KB)

1 Like

@Manohar1

Thank you very much!
Have a nice day!

1 Like

@BID
same 2 u…

Happy automation…:grinning::grinning::grinning:

1 Like

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