Check PDF file exists in path

Hi Guyz,

I want to check any pdf file that exists in a particular path, how to achieve the same.

Thank you.

1 Like

@gokulvasant

Use Path Exists Activity and Specify the path of PDF file. If it exists it will give true else false.

1 Like

Hi @gokulvasant

       Use 'Path Exists' activity to check the file contains in a particular folder or not?
1 Like

@gokulvasant

strPdfFiles = Directory.GetFiles(“FolderPath”,"*.PDF")

Int32 pdfCount = strPdfFiles.count

If it is greather than 0 then PDF file exists else no.

2 Likes

Use uipath activity Path exist activity or use .net method file.exist() this will return bool value we can directly used in if conditions OR Path.exist() this will return bool value we can directly used in if conditions

1 Like

Thank you guyz,
Got it… thank you all.

1 Like

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