To get all information of a file.

Gopesh9
Posted by Gopesh9 under ASP.NET category on | Points: 40 | Views : 960
System.IO.FileInfo file = new FileInfo("D:\\first.txt");
Response.Write("Filename:-"+file.FullName);
Response.Write("Creation Time:-"+file.CreationTime);
Response.Write("File type:-" + file.GetType);
Response.Write("Last write time:-" + file.LastWriteTime);
Response.Write("File Size:-"+file.Length);

Comments or Responses

Login to post response