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
ReTweet this Tip!
Posted
Apr 04 2012, 06:00 AM
by
ps1