John Riker

John Riker

  • NA
  • 85
  • 14.3k

Is this case sensitive?

Nov 16 2020 9:41 AM
I have a routine that loops thru a bunch of files on my hard drive and does some things to them and saves them to another format.  In my app config file I have:
  1. <add key="extensionstest" value=".mp4,.mov,.avi,.mpg,.wmv,.mkv,.m4v,.ts" />  
In my code I have: 
  1. foreach (string file in Directory.EnumerateFiles(rootfolder, "*.*", searchOption)  
  2. .Where(s => extensions.Any(ext => ext == Path.GetExtension(s))))  
If a file is .mpg it processes it but noticing .MPG is being ignored or seems to unless something else is going on.  Is the above even being on Windows case sensitive?
 
Thanks.
 
JR

Answers (2)