PIRATED 20130914 1522

PIRATED 20130914 1522

NOTE: This content appears to have been plagiarized. Please leave a comment or email tnwiki at Microsoft (with a link to this article) if we are mistaken. The content was pulled from the following source:
The community rules state:
  • "Someone else has relevant content and you want to help them share it with the world. It's a nice thought, but do not copy other people's content to the Wiki, even if the owner said it was OK."



Need to count the number of files in a directory on a Windows 2003 server ?

Here’s the command that can easily be scripted:

dir/b/a-d c:\directory | find /v /c “::”

You can also specify a file share instead of a directory name:

dir/b/a-d \\server\share | find /v /c “::”

If you want to count the number of files in a directory and all subdirectories, the command is:

dir/s/b/a-d \c:\directory | find /v /c “::”

Leave a Comment
  • Please add 2 and 1 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Carsten Siemens edited Revision 3. Comment: Pirated Content - see my comment

  • Richard Mueller edited Revision 2. Comment: Changed tags "Windows 2008" and "Windows 2003" to "Windows Server 2008" and "Windows Server 2003"

  • Ed Price - MSFT edited Original. Comment: Title casing, font style

Page 1 of 1 (3 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Ed Price - MSFT edited Original. Comment: Title casing, font style

  • perfect!

  • Richard Mueller edited Revision 2. Comment: Changed tags "Windows 2008" and "Windows 2003" to "Windows Server 2008" and "Windows Server 2003"

  • Carsten Siemens edited Revision 3. Comment: Pirated Content - see my comment

  • NOTE: This article was reported as Pirated/Plagiarized Content (content you didn't write) and will be removed. Please do not steal content from others. If you feel we are mistaken, please leave a comment or email tnwiki at Microsoft with a link to this article and with clear and detailed reasons why you own the content or have explicit permission from the author.

    Content was taken from: "Counting the number of files in a directory, command line style"

    Published by aseem1234 on June 17, 2010

    thebackroomtech.wordpress.com/.../counting-the-number-of-files-in-a-directory-command-line-style

Page 1 of 1 (5 items)