In my project, I added a folder with files in it. They all have a local path.
I want to have a string array with all the paths to all of those files, but I have no clue how to do that.
I tried this, but it only returns strings in the format of "namespace+project+foldername+name".
string[] test = Assembly.GetExecutingAssembly().GetManifestResourceNames();
What I want is the full path:
D:\Projectname\Project\Folder\file.ext
It would also help to get the reference/path to the folder, because then I could get the files with:
System.IO.Directory.GetFiles();
Anyone got an idea?
Try This.
string path= Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()));
try this
string[] files= Directory.GetFiles(@"directory");
and if you want to get your project directory use
string path = Directory.GetCurrentDirectory();