mod created, modified time/date attribs on files? 
Author Message
 mod created, modified time/date attribs on files?

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  
 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  
 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  
 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  
 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



Fri, 30 Jul 2004 07:21:25 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Modifying the Last Modified Date and Time

2. Read file Date/Time last modified

3. insert file by modified date and time

4. Modify File Date/Time Stamp with VB?

5. Modifying the file date/time

6. How to set File Modified Date/Time in VB App

7. Modifying a File's Date and Time

8. Date/Time of file modified

9. DATE CREATED and FILE TIME CREATED

10. DATE CREATED and FILE TIME CREATED

11. Q: Getting The Date/Time Of The Last Mod Of A Sql svr Table

12. HELP: File Properties - Create, Modified, Accessed Dates.

 

 
Powered by phpBB® Forum Software