Hi all, I am trying to retrieve the .pdf in the below path
C:\RPA\Project1\Inputs\example.pdf
Subsequently if the file type is different, it should be able to retrieve e.g. .xlsx, .png etc
Regards
Hi all, I am trying to retrieve the .pdf in the below path
C:\RPA\Project1\Inputs\example.pdf
Subsequently if the file type is different, it should be able to retrieve e.g. .xlsx, .png etc
Regards
Hi,
Do you need to get file extension? If so, the following expression will help you.
System.IO.Path.GetExtension(yourString)
Regards,
Ah yes that is just what I needed, thank you!
FYI, the above expression returns extension as it is.
So it may be better to use ToLower or ToUpper method if you need to check extension as the following
System.IO.Path.GetExtension(yourString).ToLower() = ".pdf"
Regards,
Okay, thanks for the heads up!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.