I working on C# application to filter the files sent from the computer to USB device based on the
file attributes. For example filter files by name, size, extension and other characteristics.
Any ideas?
File filtering in C#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
SenthilkumarRank #387 · 6.5K pointsPosted Feb 23, 2012, 9:14 PM EST
I am not understanding what you are exactly looking for.
If you want to get the file details then you can use the following.
Please include the System.IO namespace.
FileInfo fileInfo = new FileInfo(filepath);
if(fileInfo.Exists)
{
//Lot of proerties
fileInfo.Extension
Name
FullName
Length
}
Please go through my article.
http://www.c-sharpcorner.com/uploadfile/skumaar_mca/working-with-fileinfo-and-directoryinfo-classes/