sir, i have a gridview which retrive and display "file" from a folder in root directory. But the problen is that, with real file it also display two extra file, named- folder.jpg and one more with size 7kb & 28 kb....why..?
This way you will get only Non Hidden Files
DirectoryInfo dirInfo = new DirectoryInfo(@"C:\test\"); FileInfo[] files = dirInfo.GetFiles().Where(file => (file.Attributes & FileAttributes.Hidden) == 0).ToArray();
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.