You can always use the String method EndsWith(). Just make sure you convert the text to lower-case first to avoid case-sensitive comparison.
This will check whether the file name ends with '.pdf':
PS> "somefile.PdF".toLower().EndsWith('.pdf') True
You can always use the String method EndsWith(). Just make sure you convert the text to lower-case first to avoid case-sensitive comparison.
This will check whether the file name ends with '.pdf':
PS> "somefile.PdF".toLower().EndsWith('.pdf') True