Sorry about the brackets - I was just "quoting from memory" - obviously I
got it a little bit wrong! Glad you got it working!
Cheers
Ken
"Bart Plessers (artabel)" <ba**********@h otmail.com> wrote in message
news:O6******** ******@tk2msftn gp13.phx.gbl...
: sorry, found it already with your VERY helpfull link!!
:
: syntax:
: MyCount = oFolderContents .count
:
: without the brackets...
:
:
: thanx a lot again
:
: bart
:
:
:
: --
: HyperART
: Paul Van Ostaijenlaan 4
: 3001 Heverlee
:
: "Bart Plessers (artabel)" <ba**********@h otmail.com> wrote in message
: news:#i******** ******@TK2MSFTN GP09.phx.gbl...
: > Hi ken,
: >
: > thanx for quick reply.
: >
: > However, I can't get away with the syntax.
: > Can you clearify a little bit?
: > Maybe provide the correct syntax for my example below?
: >
: > > : CurrentPATH = "c:\temp\"
: > > : Set oFSO = CreateObject("S cripting.FileSy stemObject")
: > > : Set oFolder = oFSO.GetFolder( CurrentPATH)
: > > : Set oFolderContents = oFolder.Files
: > > : For Each oFileItem in oFolder.Files
: > > : .....
: > > : next
: >
: >
: >
: >
: > tia
: >
: > bart
: >
: >
: >
: >
: >
: > --
: > HyperART
: > Paul Van Ostaijenlaan 4
: > 3001 Heverlee
: >
: > "Ken Schaefer" <ke*******@THIS adOpenStatic.co m> wrote in message
: > news:e#******** ******@tk2msftn gp13.phx.gbl...
: > > The Files collection has a .Count() property that returns the number
of
: > > Files in the collection;
: > >
: > > obj.Files.Count ()
: > >
: > > where obj is a Folder object. Check the WSH reference, which you can
: > > download from here:
: > >
: >
:
http://www.microsoft.com/downloads/d...C48-207D-4BE1-
: > 8A76-1C4099D7BBB9&di splaylang=en
: > >
: > > Cheers
: > > Ken
: > >
: > >
: > >
: > > "Bart Plessers (artabel)" <ba**********@h otmail.com> wrote in message
: > > news:eN******** ******@TK2MSFTN GP10.phx.gbl...
: > > : Hello,
: > > :
: > > : I have an asp script that lists the files in a directory:
: > > :
: > > : CurrentPATH = "c:\temp\"
: > > : Set oFSO = CreateObject("S cripting.FileSy stemObject")
: > > : Set oFolder = oFSO.GetFolder( CurrentPATH)
: > > : Set oFolderContents = oFolder.Files
: > > : For Each oFileItem in oFolder.Files
: > > : .....
: > > : next
: > > :
: > > :
: > > : However,
: > > : before doing the "For..Next" loop, I want to determine the number of
: > files
: > > : in oFolderContents .
: > > :
: > > : How can I do this?
: > > : Is there another way to determine the number of files in a given
: > > directory?
: > > :
: > > : tia
: > > :
: > > : bartp
: > > :
: > > :
: > > :
: > > :
: > > :
: > > : --
: > > : HyperART
: > > : Paul Van Ostaijenlaan 4
: > > : 3001 Heverlee
: > > :
: > > :
: > > :
: > >
: > >
: >
: >
:
: