Modify File Date/Time Stamp with VB? 
Author Message
 Modify File Date/Time Stamp with VB?

How does one modify the date/time stamp of a file from Visual Basic?

Thanks in advance for any advice!

Barry Traver

Web site:   http://www.*-*-*.com/



Mon, 03 Dec 2001 03:00:00 GMT  
 Modify File Date/Time Stamp with VB?
Barry,

You can use the SetFileTime API function to set the file creation, access
and last modified times.

Hope this helps,

Kerry Moorman



Quote:
> How does one modify the date/time stamp of a file from Visual Basic?

> Thanks in advance for any advice!

> Barry Traver

> Web site:  http://traver.org/vb



Mon, 03 Dec 2001 03:00:00 GMT  
 Modify File Date/Time Stamp with VB?
Kerry,

Thanks for the help.  Is there more information (or possibly even
sample code) available, say on the Web,  on this?

I haven't worked much with API before.  I do have a copy of the VB 4
edition of Dan Appleman's Visual Basic Programmer's Guide to the Win32
API (I'm assuming it works the same in the professional edition of VB
5, which is what I'm using), but his information on SetFileTime (on
page 1077) is rather sparse and less than what I need to get me going.

Also, somewhere I heard that "you have to convert the time from the
human readable form to a UTC (Coordinated Universal Time)" to make it
work, but I'm not sure what that means, except that it didn't sound
like a simple thing to do (since it involves "the number of 100
nanosecond intervals since January 1, 1901"??).

Further details would thus be much appreciated.  (Thanks, however, for
the help given thus far!)

Barry Traver

Web site:  http://traver.org/vb
_______________________________________________________

On 17 Jun 1999 19:37:55 GMT, "Kerry Moorman"

Quote:

>Barry,

>You can use the SetFileTime API function to set the file creation, access
>and last modified times.

>Hope this helps,

>Kerry Moorman



>> How does one modify the date/time stamp of a file from Visual Basic?

>> Thanks in advance for any advice!

>> Barry Traver

>> Web site:  http://traver.org/vb



Thu, 06 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Date and Time Stamp for a Field Being Modified

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

3. Return File Date Time stamp

4. Access 7.0/8.0 (Win95) - How to retrieve a file's date/time stamp

5. Saving date/time stamp of text file

6. Determining file date-time stamp via HTTP

7. Get and set file date and time stamps

8. File's time/date stamp

9. changing date/time stamp on files

10. displaying file size, date and time stamps?

11. Need to read file Time and/or Date stamp

12. Setting file date/time stamp

 

 
Powered by phpBB® Forum Software