Sets the date and time of the last access of a file.
SetFileDateTime file$, date
SetFileDateTimeAccess file$, date
SetFileDateTimeCreate file$, date
file$:sexp
date:Date exp
The SetFileDateTime changes the last access time and/or date information assigned to a file. The command doesn't work on write protected files. Internally, it performs an Open, which might be blocked by some other application.
The SetFileDateTimeAccess changes the access time and/or date information assigned to a file. The command doesn't work on write protected files. Internally, it performs an Open, which might be blocked by some other application.
The SetFileDateTimeCreate changes the create time and/or date information assigned to a file. The command doesn't work on write protected files. Internally, it performs an Open, which might be blocked by some other application.
// Create Test file
BSave App.Path & "\Test.Dat", 100000, 100
Debug.Show
// Set file times
SetFileDateTime App.Path & "\Test.Dat", #20.12.2006#
SetFileDateTimeCreate App.Path & "\Test.Dat", #20.12.2001#
SetFileDateTimeAccess App.Path & "\Test.Dat", #20.12.2003#
// Show file times
Trace FileDateTime(App.Path & "\Test.Dat")
Trace FileDateTimeCreate(App.Path & "\Test.Dat")
Trace FileDateTimeAccess(App.Path & "\Test.Dat")
// Tidy Up
Kill App.Path & "\Test.Dat"
Windows 95 ignores the time part.
{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}