aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Checking the 'last updated' date of files on an Intranet/Internet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Checking the Watch "Checking the New topic
Author

Checking the 'last updated' date of files on an Intranet/Internet

Mark Waes
Greenhorn

Joined: Aug 06, 2008
Posts: 21
Hi,

Each month we check a number of zip files saved to an Intranet to see if they've been updated, which (usually) happens quarterly, sometimes more often.

To practice my coding skills I thought I'd write a small app which holds a list of URLs, and tests each of them to see if the file at the URL is 'newer' that the previous check performed. Currently I'm using a URLConnection object and was hoping to use its getLastModified() to determine if the file has been updated since the previous check.

I've come to test my code on various files on the Internet and is seems not all files have a value returned from getLastModified().

Is there a better way to query files in this way to see of they've been updated, or am I dependant on whether this information is present on a file by file basis?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Checking the 'last updated' date of files on an Intranet/Internet