Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have to sorted files, say A.md5 and B.md5. I would like to write a small windows batch file, which returns the lines (in my case a list of files), which are present in A but not in B (not case sensitive). I don't need to use arguments; I would like to use it in an actual batch file.

I tried

fc A.md5 B.md5

but the output is too verbose and there is no way to customise it to behave in a more minimal way. I know it’s possible to do it with find.exe, but I am not yet on a level in find.exe to be able to write this script. BTW, once I've seen a website which had hundreds of find.exe examples explained (I think a similar question was one of them), can you possibly point me to that site?

share|improve this question
    
Another homework question? How about you put in some effort of your own. Alternatively, if this isn't homework, learnt to use appropriate tools. This is absolutely trivial in Perl, as well as many other languages. –  John Gardeniers Mar 22 '11 at 10:56
    
Why would it be a homework question? I was thinking about comparing a huge list of files to a backup, and doing it by find.exe, but couldn't figure out myself. I think I will stay in the friendlier sites... –  zsero Mar 22 '11 at 18:07
add comment

closed as off topic by Iain, RobM, jscott, John Gardeniers, Scott Pack Mar 22 '11 at 11:28

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 0 down vote accepted

Cygwin has a collection of unix tools that can be run on windows including "diff" which can produce some very "unverbose" output if used with the correct parameters

share|improve this answer
add comment

The quickest way would be to open a command prompt then type fc textfile1.txt textfile2.txt > differences.txt in the location of the files. Alternativly you could add this line in a .bat file.

share|improve this answer
    
The OP says he tried that, but that the output is too verbose. –  Bart De Vos Mar 22 '11 at 8:48
add comment

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