Code for Getting Information About A File?
here we have the system.io base class in .net
FileInfo is the class which has the properties and methods
to display information about the file.
example code
FileInfo fi = new FileInfo("givepath");
Console.WriteLine("File Name:"+fi.Name);
Console.WriteLine("FullName:"+fi.FullName);
Console.WriteLine("Creation Time:"+fi.CreationTime);
Console.WriteLine("Last Access Time:"+fi.LastAccessTime);
Console.WriteLine("File Deleted :"+fi.Delete());
We can similarly know about the directory information using
DirectoryInfo di = new DirectoryInfo("path");
| Is This Answer Correct ? | 8 Yes | 0 No |
working with fileUpload ?
Coding for .NET Delegates?
what is software testing
How to get the row index on checking a Checkbox in a ListView
What do you create for easier access of data?
how to upload a photo? i need to use it in a matrimonial applicaton...
where is assembly are store
How to Create Scrollable Micro Windows?
How to send e-mail from an ASP.NET application?
16 Answers DataPoint, Infosys, Persistent, Radar, TCS, Wipro,
Code for Presenting Parent/Child Data in a Data Grid Row?
How to integrate the regional language in asp.net and c# like Telugu, Hindi etc,. send a sample program
3 Answers Concept, NIIT, Wipro,
How to use Client-side Script to Focus Controls in ASP.NET?