Hi,
I need to change modification date of a folder and some files. But I dont know any Windows API to do it.
Anyone knows it?
Thanks to all.
API to create a "touch" program
Re: API to create a "touch" program
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
netmaestro has already posted a fine example to change the creation date of a folder via Windows API:graves wrote:I need to change modification date of a folder
http://www.purebasic.fr/english/viewtopic.php?t=28023
To change the modification date of a folder simply change the following line in netmaestro's example
Code: Select all
SetFileTime_(FolderHandle, @ft, #Null, #Null)Code: Select all
SetFileTime_(FolderHandle, #Null, #Null, @ft)Win32.Hlp wrote:The SetFileTime function sets the date and time that a file was created, last accessed, or last modified.
BOOL SetFileTime(
HANDLE hFile, // identifies the file
CONST FILETIME *lpCreationTime, // time the file was created
CONST FILETIME *lpLastAccessTime, // time the file was last accessed
CONST FILETIME *lpLastWriteTime // time the file was last written
);


