Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create an MD5 file of a directory tree, containing only the bare names of the files. md5deep exactly does that, but it cannot filter for files when in recursive mode.

md5deep -rb . > md5.txt

Is there any way to filter for (*.jpg) before outputting it to md5.txt? In Linux it would be just a |, but how do I do it in Windows?

share|improve this question
up vote 1 down vote accepted

md5deep doesn't filter just those file you give in the filspec e.g. *.jpg. You can use find to generare the file list and pass it to md5deep

find . -name '*.jpg' -exec md5deep -b {} + >>md5.txt

You should delete the md5.txt file before running the code again otherwise it will have a new set of files appended to it.

share|improve this answer
This one looks professional. In the meantime, I've just done this 'md5deep -rb . | find /I ".jpg" > local.md5' Its not very efficient, because it hashes first, then filters the files, but in my case all the other files are really small files, so it doesn't make a change. But yours is definately better. – zsero Mar 20 '11 at 19:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.