How can I exclude all .txt
file and doc file in a folder?
I am able to get all the file but unable to exclude .txt
file and .doc
files.
foreach (string f in Directory.GetFiles(@readpath))
{
List<string> list = new List<string>();
list.Add(f);
for (listcount = 0; listcount < list.Count; listcount++)
{
path2 = list[listcount];
creationdate = File.GetCreationTime(path2);
modidate = File.GetLastWriteTime(path2);
}
chkchecksum();
}