Hello
Can someone please help with the following question.
I have a file located at a URL lets call it http://Web01/folder/file.txt
I want to check the date and time the file was created.
if I do
(New-Object System.Net.WebClient).DownloadFile("http://Web01/folder/file.txt", "C:\temp\file.txt")
The file is downloaded and now I have a copy of the file at C:\temp\file.txt
The problem is the creation datetime of C:\temp\file.txt is now e.g. the date and time I downloaded the file.
What I need to achieve is, I need to know the date and time of the file http://Web01/folder/file.txt
Therefore I need to inspect the file 'in situ' and retrieve creation datetime
Is there another method on the System.Net.WebClient class that will give me this information or do I have to use invoke-webrequest or some other method?
Thanks All
AAnotherUser__