Does anybody know if it's possible to modify the "Created" or "Modified" date/time attributes on files using Visual Basic? I need to write a utility to correct time-zone shifts (+/- 1,2 hours) on directories full of files. I've done some VB (couple years back) and am still fairly comfortable in it, but have never tried this.... Any pointers would be appreciated!
Thanks!
Tue, 27 Jul 2004 12:17:39 GMT
Brian Shafe #2 / 5
mod created, modified time/date attribs on files?
Yes, it is possible. I can't remember the code and don't have my book here. But I think the name of the book is Visual Basic Developers Handbook. One of the authors is Ken Getz.
Quote:
> Does anybody know if it's possible to modify the "Created" or "Modified" > date/time attributes on files using Visual Basic? I need to write a utility > to correct time-zone shifts (+/- 1,2 hours) on directories full of files. > I've done some VB (couple years back) and am still fairly comfortable in it, > but have never tried this.... Any pointers would be appreciated!
> Thanks!
Tue, 27 Jul 2004 12:22:40 GMT
Harry Strybo #3 / 5
mod created, modified time/date attribs on files?
Quote:
> Does anybody know if it's possible to modify the "Created" or "Modified" > date/time attributes on files using Visual Basic? I need to write a utility > to correct time-zone shifts (+/- 1,2 hours) on directories full of files. > I've done some VB (couple years back) and am still fairly comfortable in it, > but have never tried this.... Any pointers would be appreciated!
> Thanks!
The main API you need is SetFileTime. There is an interesting article in VB Tech Tips September 2001. Its on page 28 and is part of an article headed "Override Built-In keywords.
This process takes a bit of explaining so you need to do a bit of reseach.
Tue, 27 Jul 2004 15:07:59 GMT
Marc A. Nowel #4 / 5
mod created, modified time/date attribs on files?
Thanks to all to replied, I'll work on chasing up those sources. Time to dive back in!
Fri, 30 Jul 2004 02:36:04 GMT
J Fren #5 / 5
mod created, modified time/date attribs on files?
On Sun, 10 Feb 2002 18:36:04 GMT, "Marc A. Nowell"
Quote:
>Thanks to all to replied, I'll work on chasing up those sources. Time to >dive back in!
Download the API Guide from www.AllAPI.net
SetFileTime is in there with a pretty good example