$path = "report.final.txt" # True (plain substring) $path.Contains(".final") # True (wildcard glob) $path -like "*.txt"
substring test vs wildcard match