Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I m working on proj. whr I need to get all files of perticular folder
in a list box and by selecting the file name it shoul give the file details
such as Date,Size,type etc.
Posted

You can use the FileInfo[^] class to get a files properties.
 
Share this answer
 
Create
C#
FileInfo
object for the required file by passing complete path of that file as parameter to its constructor.

Using that object you can use
C#
CreationTime, FullName, DirectoryName, LastAccesTime, Length, Type


Hope this is the required details for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900