• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1447
  • Last Modified:

How to count files in a folder having sub folders+vb6.0

Hi,
Need to find the total file count in a folder having sub folders in vb6.0
Any help is appreciated.

Cheers
0
RIAS
Asked:
RIAS
1 Solution
 
Om PrakashCommented:
0
 
RIASAuthor Commented:
Cheers mate
0
 
newhottaCommented:
You can use this for flat query:

Dim f As String, c As Long
f = Dir$("c:\*.txt")
Do While Len(f) <> 0
    c = c + 1
    f = Dir$
Loop
MsgBox "There are" & c & " txt files in C:\"


For nested files' count:
http://www.freevbcode.com/ShowCode.asp?ID=3634


For more information about the Dir function:
http://msdn.microsoft.com/en-us/library/Aa262726
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now