I want to return file names from a specific folder and its subdirectories, but this folder can exist at different paths depending on the drive and Windows version, for example:
C:\Program Files\MyApp
D:\Program Files\MyApp
E:\Program Files\MyApp
F:\Program Files\MyApp
C:\Program Files (x86)\MyApp
D:\Program Files (x86)\MyApp
E:\Program Files (x86)\MyApp
F:\Program Files (x86)\MyApp
(This folder can exist at only one of those paths.)
This is what I've tried:
Directory.GetFiles("path", "thefiles", SearchOption.AllDirectories)