Thread View: be.comp.programming
3 messages
3 total messages
Started by Erik Muurman
Thu, 18 Sep 2003 17:32
VB: Oudste bestand in een directory vinden
Author: Erik Muurman
Date: Thu, 18 Sep 2003 17:32
Date: Thu, 18 Sep 2003 17:32
2 lines
1232 bytes
1232 bytes
Wie weet hoe ik in visualbasic bepaal wat het oudste bestand in een directory is.
Re: VB: Oudste bestand in een directory vinden
Author: Arnold Ligtvoet
Date: Thu, 18 Sep 2003 20:25
Date: Thu, 18 Sep 2003 20:25
20 lines
1436 bytes
1436 bytes
Erik Muurman wrote: > Wie weet hoe ik in visualbasic bepaal wat het oudste bestand in een > directory is. > > Met de FileDateTime functie de datum van ieder bestand checken en dan de oudste bewaren ? Dus in pseudo code newdate = now() for each file in files date = FileDateTime(file) if date < newdate then newdate = date end if next Arnold
Re: VB: Oudste bestand in een directory vinden
Author: Dr.Ruud
Date: Fri, 19 Sep 2003 08:49
Date: Fri, 19 Sep 2003 08:49
27 lines
1784 bytes
1784 bytes
Toen ik Arnold Ligtvoet kietelde, kwam er dit uit:
> Erik Muurman:
>> Wie weet hoe ik in visualbasic bepaal wat het oudste bestand in een
>> directory is.
> newdate = now()
> for each file in files
> date = FileDateTime(file)
> if date < newdate then
> newdate = date
> end if
> next
Dat gaat 'mis' als alle bestanden datims in de toekomst hebben.
En als er geen bestanden zijn.
newdatim = Null
For Each file In files
fdatim = FileDateTime(file)
If IsNull(newdatim) Or newdatim > fdatim Then
newdatim = fdatim
End If
Next
--
Affijn, Ruud
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads