DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How do I count # of files in directory (partial name)

  1. #1
    Join Date
    Sep 2004
    Posts
    11

    How do I count # of files in directory (partial name)

    Question: I have folders named:
    AV-215 The Best Is Yet To Come
    AV-300 For The One Time You Do It
    AV-215 Kinda Liked You Before
    AV-310 This Is The Place And The Time
    ...etc.
    I need a way to input, for example "AV-215" and have my VB6 program tell me how many files in ALL folders with the first characters "AV-215", total.

  2. #2
    Join Date
    Jun 2009
    Posts
    135
    I believe the Dir Function... Dir("AV-215*.*, vbDirectory) see help file example for exact syntax of testing for a directory. Then once you have a list of dirs, go back and get list of files or count or whatever...



    Good Luck

  3. #3
    Join Date
    Sep 2004
    Posts
    11
    Can't do that.
    Need to be able to do this in one pass.
    thanks

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Why? Once the program works and is compiled, no one will know what goes on underneath the hood except you.

    If you could see the actual source code for half the commerical software available today you would laugh yourself silly.

Similar Threads

  1. Replies: 2
    Last Post: 09-14-2008, 08:56 AM
  2. Query works in Access, but not VB .NET
    By corygibbons in forum Database
    Replies: 6
    Last Post: 07-11-2007, 08:30 PM
  3. word count
    By chintucs in forum Java
    Replies: 0
    Last Post: 01-23-2007, 06:03 PM
  4. need to return total record count, but here is the trick...
    By barbarosa80503 in forum VB Classic
    Replies: 2
    Last Post: 10-28-2005, 03:33 PM
  5. Replies: 1
    Last Post: 04-06-2005, 02:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center