SetFileAttributes(f$, t)
The file (or directory) whose attributes you want to change must be
passed as parameter f$
. The second parameter is a table which contains
all attributes you want to modify. The following fields can be set
in the table:
Flags:
#FILEATTR_NORMAL
to reset all protection flags. See Protection flags for details.
Time:
LastAccessTime:
CreationTime:
Comment:
Adapter:
UserTags:
t = {} t.time = "15-Dec-2006 23:30:12" t.flags = #FILEATTR_READ_USR | #FILEATTR_WRITE_USR SetFileAttributes("test.txt", t)The code above sets the time stamp of file "test.txt" to December 15th, 2006 at 11:30pm and 12 seconds. Additionally it sets the protection flags
#FILEATTR_READ_USR
and #FILEATTR_WRITE_USR
.