🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #4011

Re: VB: Oudste bestand in een directory vinden

#4011
From: Dr.Ruud
Date: Fri, 19 Sep 2003 08:49
27 lines
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
Technical Details
Message-ID: <bken5b.1f8.1@news.isolution.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed1.uni2.dk!newsgate.cistron.nl!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!rhinewceros.xs4all.nl!not-for-mail
References: <bkcq78$crg$1@news3.tilbu1.nb.home.nl> <vmk55oem25ub68@corp.supernews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,416e4ebb3bca3e65
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,416e4ebb3bca3e65
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-09-19 01:59:25 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed1.uni2.dk!newsgate.cistron.nl!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!rhinewceros.xs4all.nl!not-for-mail
Message-ID: <bken5b.1f8.1@news.isolution.nl>
Reply-To: "Dr.Ruud" <rvtol+news@hacktic.nl>
From: "Dr.Ruud" <'t.leven.is.fijn@life.i$.great>
Newsgroups: be.comp.programming,nl.comp.programmeren
References: <bkcq78$crg$1@news3.tilbu1.nb.home.nl> <vmk55oem25ub68@corp.supernews.com>
Subject: Re: VB: Oudste bestand in een directory vinden
Date: Fri, 19 Sep 2003 10:49:22 +0200
Organization: Chaos rules.
X-Newsreader: WMDIYA
Approved: yesterday
X-Face: &CQ$FIr!=+=w,8`0Q^Ug"1>F[(/op8->E;NQet`5fe$;=e*!Z5&REvp<~Tj|"Y[|8OcJ{w#z&mB7B:I)XO*%_|\]|YW$C>>$Q[9-#K~c$tQ^Mf0,wMo?h\C)TE>f
Lines: 29
NNTP-Posting-Host: 24.132.0.158
X-Trace: 1063961945 dreader9.news.xs4all.nl 59138 rvtol/24.132.0.158:16395