Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: FSO -- File count.


Message #1 by "aaron" <agflem@y...> on Mon, 21 Oct 2002 13:44:31 -0400
Thanks Marco - that will work fine :)

> -----Original Message-----
> From: Marco Straforini [mailto:marco.straforini@c...] 
> Sent: Tuesday, October 22, 2002 1:40 AM
> To: professional vb
> Subject: [pro_vb] Re: FSO -- File count.
> 
> 
> Sorry, I never used the file system object.
> 
> The standard VB way to do it is to iterate through the files 
> using the Dir function, and get the last modification date 
> using the FIleDateTime function, something like:
> 
> dim sfile as string
> dim count as long
> sfile = dir(*394820397*.txt)
> do
>   if len(sfile)=0 then exit do
>   if filedatetime(sfile) > something then  '' or use DateDiff
>      count=count+1
>   endif
>   sfile = dir
> loop
> 
> 
> 
> Marco
> 
> > Would it be possible to count the number of files in a folder that 
> > have
> a particular filename and creation date???
> 
> Like:
> *394820397*.txt --- Created Today
> 
> Thanks!
> 
> 
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills 
> from Visual Basic 6 to C#, the language of choice 
> of the .NET Framework. 
> http://www.wrox.com/ACON11.asp?ISBN=1861007175> &p2p0059
> 
> ---
> 
> 


  Return to Index