Allie Technology corner
Wednesday, June 19, 2019
c# - Loop through files in a directory
using System.IO;
static void loopThroughDirectory(string sourceDir)
{
DirectoryInfo di = new DirectoryInfo(sourceDir);
//Process each file
foreach (FileInfo fi in di.GetFiles())
{
string fileNameAndPath = fi.FullName;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment