Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

How to get last modified time of file on http server in c#
Posted

Try:
FileInfo fi = new FileInfo(@"F:\Temp\Roman.txt");
DateTime when = fi.LastWriteTime;
 
Share this answer
 
Comments
Jayesh Deriya 20-Apr-11 3:07am    
But my path is "http://localhost/TMG_Local/Home/123.xlsx"
Take a look at WebClient[^] and ResponseHeaders[^]

ResponseHeaders is a collection of WebHeaderCollection, under Response headers there are information like:

Content-Length
Content-Type

Perhaps it can help you :-)
 
Share this answer
 
v2
Comments
Jayesh Deriya 20-Apr-11 4:02am    
Thanks buddy
Kim Togo 20-Apr-11 4:06am    
If it works for you. Please reply back :-)
Kim Togo 20-Apr-11 16:17pm    
Did it work for you?
Jayesh Deriya 28-Apr-11 4:16am    
yes

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