|
-
Jun 29th, 2005, 07:27 PM
#1
Thread Starter
Fanatic Member
Count Files in Folder. [RESOLVED]
How do I count the files in a folder?
Thanks,
Sir Loin
Last edited by Sir Loin; Jun 29th, 2005 at 07:42 PM.
-
Jun 29th, 2005, 07:34 PM
#2
Re: Count Files in Folder.
-
Jun 29th, 2005, 07:35 PM
#3
Re: Count Files in Folder.
The easy way is to use FileSystemObject (scripting library):
VB Code:
Private Sub Command1_Click()
'===============================
Dim fso As New FileSystemObject
Dim fldr As Folder
Set fldr = fso.GetFolder("c:\windows")
MsgBox "Total files in the folder: " & fldr.Files.Count
End Sub
The better way is to use Windows API but this also means much more coding.
-
Jun 29th, 2005, 07:42 PM
#4
Thread Starter
Fanatic Member
Re: Count Files in Folder.
Nice, thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|