Jump to content
Macro Express Forums

Number Of Files In A Directory


Recommended Posts

I have a situation where each submission by a group is done by creting a unique file and placing it in the group's directory. All of group directories are located inside a directory on the network somewhere. New submissions are being added throughout the day.


I need to get a count of each group's submission at the beginning of the day and again at the end of it. How can I do it? I have looked and do not see a way to count file names using any of the integer lines.

Link to comment
Share on other sites

Will this work?


* Create a blank text file

* Start a "Repeat with Folder" loop, set to look at each folder in the folder

-- Set %N1% to zero

-- Set %T2% to the group (folder) name

-- Start a "Repeat with Folder" loop, set to look at each file in the folder

+ Increment %N1%

-- End the "Repeat with Folder" loop.

-- Convert N1 to a string, and append to %T2%

-- Append %T2% to a new line in a text file.

* Move on to the next group folder


Now, you can read in the text file to get your group-folder names and the number of files within each group folder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...