Restored from previous forum. Originally posted by cor.
How to get the date of a file?
Using Windows 98 SE
Registered PB version : 3.40 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
How to get the date of a file?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Froggerprogger.
(From this forum just about 20 days before:)
(From this forum just about 20 days before:)
Purebasic - what a nice name for a girl-friendAuthor Topic
Tecor400
Spain
3 Posts
Posted - 28 Nov 2002 : 14:12:44
--------------------------------------------------------------------------------
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
Pupil
Sweden
349 Posts
Posted - 28 Nov 2002 : 15:28:45
--------------------------------------------------------------------------------
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):
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..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
Resources site: http://www.reelmediaproductions.com/pb/
Hope this info will help you...
--------------------------------------------------------------------------------
Edited by - Pupil on 28 Nov 2002 15:30:21
Tecor400
Spain
3 Posts
Posted - 29 Nov 2002 : 12:16:24
--------------------------------------------------------------------------------
It runs fine.
Thanks
BR
Joaquin