URLDownloadToFile API

J

JB

Hi Folks,
I've been using this to update files with some success but.....I wish to
modify my code. At the moment it takes the file from the server and
updates the copies regardless of version. This is fine (or has bene up
to now at least) as I always make sure the files on the server are the
latest versions.

I'd like to check if the file is of a certain date before downloading it
is this possible?

Cheers

J
 
J

Jay Freedman

JB said:
Hi Folks,
I've been using this to update files with some success but.....I wish
to modify my code. At the moment it takes the file from the server
and updates the copies regardless of version. This is fine (or has
bene up to now at least) as I always make sure the files on the
server are the latest versions.

I'd like to check if the file is of a certain date before downloading
it is this possible?

Cheers

J

Check out the FileDateTime function, standard in VBA.
 
J

Jay Freedman

JB said:
Hi Jay,
Could I use this to check the stamp Before download?

J

Yes, the function takes one parameter -- the path/filename of the file --
and returns the file's date/time stamp. The file does not have to be opened
in Word or copied to a local drive.

The path can be either a mapped drive like "Z:\myfolder\myfile.doc" or a UNC
path like \\myserver\myshare\myfolder\myfile.doc. The result comes back as a
Variant in the format 3/29/1999 12:28:08 PM but you can treat it as a
String.
 
J

JB

Jay said:
Yes, the function takes one parameter -- the path/filename of the file --
and returns the file's date/time stamp. The file does not have to be opened
in Word or copied to a local drive.

The path can be either a mapped drive like "Z:\myfolder\myfile.doc" or a UNC
path like \\myserver\myshare\myfolder\myfile.doc. The result comes back as a
Variant in the format 3/29/1999 12:28:08 PM but you can treat it as a
String.
Thanks Jay.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top