+ Reply to Thread
Results 1 to 3 of 3

Count files in a directory

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Count files in a directory

    Hello,

    I have a variable called xDir which is a folder directory captured through:
    Please Login or Register  to view this content.
    I need to get the files count within the XDir folder (including all folders, all subfolders all sub-sub folders).

    Could you please advise?
    Thanks

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Re: Count files in a directory


    Hello,

    don't you find any sample on web ?!
    Common solution exists but often for Windows only so on what OS ?
    And why do you really need this in particulat under Excel ?!

  3. #3
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: Count files in a directory

    Thank you Marc,
    Indeed, I was able to find a script on a web site.
    I needed it in Excel because this subroutine is part of a larger script of listing and comparing files tracked in an Excel spreadsheet,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Count number of pages of pdf files in directory by VBA
    By Jesseke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2020, 04:41 AM
  2. [SOLVED] macro to copy excel files only from main directory and sub directory to a specific folder
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2019, 09:49 AM
  3. Count Rows in all files in a directory
    By dyung in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2016, 05:32 PM
  4. How can i get the records/rows count of files in a directory
    By anaconte1010 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2013, 12:54 PM
  5. How to count # of .xls files in a directory - I NEED HELP PLEASE
    By anaconte1010 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-10-2013, 12:04 PM
  6. Reading in the files in a directory into an array, directory chosen by user
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2011, 12:52 PM
  7. Count files in directory
    By Vlad999 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-21-2006, 07:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1