Have you ever wanted to set a file's date and timestamp? VB allows you to look at a file's date and time with the FileDateTime function. This is fine for comparing timestamps, but sometimes you may want to artificially alter the timestamp of a file programmatically.
Here are some examples where this can be useful:
* Installation programs often will tend to overwrite older files with newer
ones, but you can prevent this by assigning an artifically early date to the
file so that won't happen. Alternatively, you can force an installation program
to overwrite a file by assigning a very futuristic file date.
* Programs that download files via FTP or HTTP will assign a creation and last
write time at the time of download. If you want to preserve the date and you
are using an Internet Client ActiveX control, you can usually find out the date
of the file on the server, download the file, then set the file date after it
has been downloaded so that the downloaded file's date is in synch with the
file on the server.
This tutorial will show you how to do all of this!
Comments