Hi,
I'm trying to code the following:
Search a directory for files with a specific fileextension and get the newest file according to windows timestamp.
I need to get it based on time instead of date, but can't find any commands for it in Purebasic.
Anyone have any ideas?
File Timestamp
File Timestamp
Currently coding the unbelievable WFS program...
You'll know it, when it gets released...
You'll know it, when it gets released...
Re: File Timestamp
I managed to code this, using this code:
NbFiles=SearchFilesInit("H:\My Documents\","*.stv",0)
Repeat
File$=SearchFilesGet()
If File$="" : Break : EndIf
datum$ = FormatDate("%yyyy%mm%dd%hh%ii%ss", GetFileDate(File$, #PB_Date_Modified))
If Val(datum$) > Val(datumlast$)
datumlast$ = datum$
laatste$ = File$
EndIf
ForEver
MessageRequester("Last created .stv file was: ", laatste$,#PB_MessageRequester_Ok)
NbFiles=SearchFilesInit("H:\My Documents\","*.stv",0)
Repeat
File$=SearchFilesGet()
If File$="" : Break : EndIf
datum$ = FormatDate("%yyyy%mm%dd%hh%ii%ss", GetFileDate(File$, #PB_Date_Modified))
If Val(datum$) > Val(datumlast$)
datumlast$ = datum$
laatste$ = File$
EndIf
ForEver
MessageRequester("Last created .stv file was: ", laatste$,#PB_MessageRequester_Ok)
Currently coding the unbelievable WFS program...
You'll know it, when it gets released...
You'll know it, when it gets released...
