• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Batch] Comparing Text Files

Status
Not open for further replies.
Comparing files in batch is possible I think, but writing everything one has which the other doesn't have is harder and I doubt it's possible. Just use C++ or Java or something similar.
You can easily run other batch files from a C++/Java program and vice versa.
 
I could probably make something like that in Java.

Edit: Do you want to check for certain words or do you want to check each file as a string and then compare the characters in that string?

F.ex.
File 1:
"asdasd"

File 2:
"esdasf"

File 3:
"ef"


Edit: Here it is, I did it like in that example I added, but it checks for things File 1 has which File 2 doesn't have (not what File 2 has which File 1 doesn't have) and it's easy to use. Just make a batch file and put it in the same folder as the .jar file below and do
"File Comparer.jar" <File 1> <File 2> <Result file>

Example:
"File Comparer.jar" Rofl.txt Omg.txt MUahahahahah.txt


If you get any errors or if it's not working correctly please notify me.
 

Attachments

Last edited:
It is possible to write the content of a text file into another text file but i don't think it can compare the contents it has. It maybe possible with some programming languages.
 
I am not sure if string subtraction is possible in batch.
Like:
A = Contents of a.txt
B = Contents of b.txt
C = B - A

We may be able to do that but my mind can't think today. lol
 
Status
Not open for further replies.
Back
Top