Using PowerShell, how can I get a list of file names within a string, if I only know the extension?
C:\> $e = "CN=Ken Myer world.jpg more text." C:\> $f = $e.IndexOf(".jpg") C:\> write-host $f 17
How do I get the rest of the unknown file name? (Assuming a 5 character file name) I can not plug in a negative number into $e.Substring(17,-5,9) <--does not work.