I have a simple question, but that it's driving me crazy.
I have a folder with a lot of JSON
files inside, I need just to open those files one by one and do things.
So, I need to open the first one, read it and do something then go to the second one etc. until the last.
Here the code I tried, searching on web:
string folderpath = @"C:\Users\rfo\Desktop\MM\VM DB\nv - master\nvd";
var fixedfolderpath = Environment.ExpandEnvironmentVariables(folderpath);
string [] filesnumber = Directory.GetFiles(fixedfolderpath, "*.json");
foreach (string filename in filesnumber)
{
var jsonFull = System.IO.File.ReadAllText(filename);
But I keep gettin error DirectoryNotFoundException: Could not find a part of the path on the browser
.
I'm using asp.net CORE 3
and visual studio 2019.