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 |
ArrayList declaration in .net
how to design a ListView control?
How we implement the paypal in my website and how we make a payment through Credit Card.
how can we close a web page in asp.net without using jscript?
How to Snap the Cursor to a Button?
How to send e-mail from an ASP.NET application?
16 Answers DataPoint, Infosys, Persistent, Radar, TCS, Wipro,
Coding for .NET Delegates?
how to upload an excel in c# ASP.Net?
How to Export Data to Excel?
How to use Client-side Script to Focus Controls in ASP.NET?
Code for Presenting Parent/Child Data in a Data Grid Row?
How to Bind Nested XML to a Repeater Control with Container.DataItem?