Here i am retrieving minimum size of a text file inside a directory.But it gives 0 as a minimum size.But there is no 0 kb file inside that directory.
var queryList3Only= (from i in di.GetFiles("*.txt", SearchOption.AllDirectories)
select i.Length / 1024).Min();
dest.WriteLine(queryList3Only.ToString()+" Kb");
Any Suggestion?
you need to select doubles not int’s. if filesize is < 1024 then you will end with size 0