Catching all files with the name started by something in a directory

3

I want to get all files started by something, for example, "javaw" in a certain directory. Thanks for the time.

    
asked by anonymous 06.09.2015 / 00:51

1 answer

4

There is not much secret:

Directory.GetFiles("C:\diretorio", "javaw*", SearchOption.AllDirectories);

For recursive search, and

Directory.GetFiles("C:\diretorio", "javaw*", SearchOption.AllDirectories);

See more about Directory.GetFiles here .     

06.09.2015 / 01:46