Page 1 of 1

Posted: Thu Nov 28, 2002 2:12 pm
by BackupUser
Restored from previous forum. Originally posted by Tecor400.

Hi,
I have not found in PB documentation any command who allows to retreive the date of a file.

Somebody can help me?

BR
Joaquin

Posted: Thu Nov 28, 2002 3:28 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.

Use Win API command for this. Something like this should do it(you might have to correct some stuff, as i haven't tested it yet):

Code: Select all

hFile.l = ReadFile(0, "Your file to open")
If hFile
  If GetFileTime_(hFile, @creationtime.FILETIME, @lastaccestime.FILETIME, lastwritetime.FILETIME)
    FileTimeToSystemTime_(@creationtime, @time.SYSTEMTIME)
    ; the structure SYSTEMTIME contains year, month, day, hour, minute, second, millisecond
    ; Recently someone wrote a snippet to interpret this info see att Resoures site or
    ; this forum for more info about that.
  EndIf
  CloseFile(0)
EndIf
You really should get a Win API helpfile to be able to digest this properly, on the resources site there's some links that might help i think..
Resources site: http://www.reelmediaproductions.com/pb/

Hope this info will help you...

Posted: Fri Nov 29, 2002 12:16 pm
by BackupUser
Restored from previous forum. Originally posted by Tecor400.



It runs fine.
Thanks

BR
Joaquin