How to count files of a certain type in a folder on Windows 8.1?

4

I'm in the process of backing up some of my data. After (presumably) updating my back up music folder on my external hard drive, I check the size of both my back up music folder and my standard music folder and they differ.

A possible reason for this is that the standard music folder is updated with album art fagotry. As such, I want to be able to count how many mp3s (I can live with ignoring the other music formats) I have on a folder. How can I do this?

Other work arounds to guarantee that I have the same music files on both folders are also welcome.

I'm on Windows 8.1 Pro x64.

Git Gud

Posted 2014-07-18T16:40:30.840

Reputation: 207

In cmd use a command such as dir *.mp3 | find "File(s)" in each directory. This will give you two consecutive lines to compare. (NB Tested on XP - it is possible that W7 changed the summary line format, but it will be trivial to alter the find string if so.) – AFH – 2014-07-18T17:03:01.450

and easier cmd is dir /s *.mp3 | find /c "mp3" – Garr Godfrey – 2017-07-25T00:12:00.787

Answers

3

You can do this by:

  • typing *.mp3 in the search box
  • see the file count at the bottom of the window

enter image description here

(PS. I'm not showing you my music collection :P)


If you want to compare the 2 folders, use the technique here. It basically uses the command line and robocopy (included with win8).

Copied and pasted from above link:

ROBOCOPY “\\FileShare\SourceFolder” “\\FileShare\ComparisonFolder” /e /l /ns /njs /njh /ndl /fp /log:reconcile.txt

Explanation of the command switches used above:

  • /e Recurse through sub-directories (including empty ones)
  • /l Don’t modify or copy files, log differences only
  • /fp Include the full path of files in log (only necessary if you omit /ndl)
  • /ns Don’t include file sizes in log
  • /ndl Don’t include folders in log
  • /njs Don’t include Job Summary
  • /njh Don’t include Job Header
  • /log:reconcile.txt Write log to reconcile.txt (Recreate if exists)
  • /log+: reconcile.txt (Optional variant) Write log to reconcile.txt (Append if exists)

ᔕᖺᘎᕊ

Posted 2014-07-18T16:40:30.840

Reputation: 5 559

Perfect. Selecting the files was unnecessary, though. The file count shows up at the bottom without selecting them. – Git Gud – 2014-07-18T16:47:34.303

@GitGud you're right. I was on my Win7 laptop, so I didn't know exactly, but I've added a screenshot now (in win8 :) – ᔕᖺᘎᕊ – 2014-07-18T16:57:46.863