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

Asked

Viewed 38 times

3

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

1 answer

4


It’s not much of a secret:

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

For recursive search, and

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

See more about the Directory.GetFiles here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.