0

I have a file with the following uri http://10.20.80.001/mobilepayment/hi.cer published in iis . Is there any way to get the date created of this file in vb?? I want something like this

Dim fullpath = http://10.20.80.001/mobilepayment/hi.cer
Dim infoReader As System.IO.FileInfo
infoReader = My.Computer.FileSystem.GetFileInfo(fullpath)
Dim Filetimestamp As String = infoReader.LastWriteTime.ToString("yyMMddHHmmss")

thanks!

1 Answers1

0

You need to actually GET the file from the URI. Until you've done that it is just a string.

So either perform a web request and download it to a temporary location, then use that location as your "fullpath" OR when you request it inspect the HTTP headers for the last modified date.

SazooCat
  • 150
  • 1
  • 6
  • But I won't get the right creation date of the original file. I'll get the date when I downloaded the file. I want to get the original one, The date of Creation of "http://10.20.80.001/mobilepayment/hi.cer" – Fares Joseph Eid Dec 08 '14 at 07:45
  • please check the following question http://stackoverflow.com/questions/27352736/get-creation-date-of-a-file-on-the-web – Fares Joseph Eid Dec 08 '14 at 07:45