How to get files in a relative path in C#

Viewed 166660

If I have an executable called app.exe which is what I am coding in C#, how would I get files from a folder loaded in the same directory as the app.exe, using relative paths?

This throws an illegal characters in path exception:

string [ ] files = Directory.GetFiles ( "\\Archive\\*.zip" );

How would one do this in C#?

5 Answers
Related