I want to download a file from cloud and i want to get the path of that downloaded file through C# programming.
I'm able to fetch file by passing the path through a variable. But I need to fetch the file without passing file path as variable.could anyone help me on this.
var folderPath = "C:\\Users\\T430\\source\\repos\\download\\download\\bin\\Debug";
foreach (string file in Directory.EnumerateFiles(folderPath, "sample*.xml"))
{
string contents = File.ReadAllText(file);
Console.WriteLine(contents);
Console.ReadLine();
}
Loading

Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Mar 17, 2018, 9:37 AM EDT
dhanu shree58 reputationPosted Mar 17, 2018, 10:14 AM EDT
dhanu shree58 reputationPosted Mar 17, 2018, 10:16 AM EDT
dhanu shree58 reputationPosted Mar 17, 2018, 10:37 AM EDT