Finding PDF file in the server

Hi Everyone,

I have a scenario that, need to find the PDF file which is stored the server. Also in server many folder are their it’s like 100 folders. Then i have to attach that file into outlook mail and send. I’m new to RPA…please hele me out…

Hi @Mohan1,

Refer this code

var filenames = Directory.EnumerateFiles(Filelocation, “*.pdf”, SearchOption.AllDirectories);
foreach (string fileName in filenames)
{
filePathList.Add(fileName);
}
Regards,
Arivu

Thank you arivu…let me try this…

Hi aruvi,

Filename should be what type? String or array of string

Hi @Mohan1,

create variable ->filenames -string
create variable ->Filelocation-string(File Path)
create variable ->filePathList->List(if you required)
Assign ->filenames=Directory.EnumerateFiles(Filelocation, “*.pdf”, SearchOption.AllDirectories)
use for each activity to get the all pdf file path.

Regards,
Arivu