Retrieve timestamp of remote file

  • Thread starter Thread starter Martin Zugec
  • Start date Start date
M

Martin Zugec

Heya,

googling\liveing around, but I found no results - any ideas how to
retrieve timestamp of remote file (http\ftp)???

Idea is to build auto update utility that could (based on timestamps)
notify you whenever new version is available...

Thanks for any ideas\suggestions (and especially link or bits of
code),

Martin
 
Heya,

googling\liveing around, but I found no results - any ideas how to
retrieve timestamp of remote file (http\ftp)???

Idea is to build auto update utility that could (based on timestamps)
notify you whenever new version is available...

Thanks for any ideas\suggestions (and especially link or bits of
code),

Martin

Hi Martin,
Are you able to download the file if it's not too large. Because if it
was a local file, you would simply access file info using
System.IO.FileInfo class. If remote file resides on a FTP server, you
can check this out:

http://www.codeproject.com/kb/IP/FTPBypkhach.aspx

Hope this helps,

Onur Güzel
 
Hi Martin,
Are you able to download the file if it's not too large. Because if it
was a local file, you would simply access file info using
System.IO.FileInfo class. If remote file resides on a FTP server, you
can check this out:

http://www.codeproject.com/kb/IP/FTPBypkhach.aspx

Hope this helps,

Onur Güzel

Hi Onur,

I cant download it - idea is quite simple:
1.) You create list of your favorite programs and specify where did
you download them (PsTools=http://download.sysinternals.com/Files/
PsTools.zip)
2.) Time stamp of that file is saved
3.) When you run this tool, it will check last time stamp with
current. If there is difference, it will report that new version is
available.

I have this working currently from batch script using wget - problem
is that if I want to use more advanced methods, for example if file
contains also version (like PsTools_2.1.zip), I need some more
intelligent parsing (HREF etc) and this is almost impossible from
batch scripts.

So I am trying to find some way how to get timestamp of remote file -
then I'll be able to rewrite my script to normal tool with GUI and
some advanced features.

If I won't find a way, I will probably need to just parse output from
wget, but I would prefer to find other way than this :(

Martin
 
Back
Top