xxxxxxxxxx
string path = "C:\Users\Public\TestFolder\WriteText.txt";
// Read as a single string
string text = System.IO.File.ReadAllText(path);
// Read each line into a string array
string[] lines = System.IO.File.ReadAllLines(path);
xxxxxxxxxx
using System.IO;
string filePath = @"C:\Users\john\Documents\example.txt";
string fileName = Path.GetFileName(filePath);
Console.WriteLine("File name: " + fileName);
xxxxxxxxxx
string[] files = Directory.GetFiles(tx_path1.Text);
for(var i = 0; i < files.Length; i++)
{
}