Questions tagged [file-comparison]

File comparison is the act of comparing one file's properties with another's.

Use this tag for questions related to comparing the size, content, etc. of two or more files.

161 questions
4
votes
1 answer

Are two File pointing to the same file?

I want to make sure that two java.io.File are not pointing to the same file, I have tried various methods, and finally found a way, but I want to make sure there is no loophole around it. it's important because I am trying to write a program to…
hanbin615
  • 575
  • 1
  • 5
  • 13
4
votes
4 answers

how to compare two files and print mismatched line number in python?

I have two files which contains same number of lines. "file1.txt" contains following lines: Attitude is a little thing that makes a big difference The only disability in life is a bad attitude Abundance is, in large part, an attitude Smile when…
user3116273
  • 81
  • 1
  • 3
  • 10
4
votes
1 answer

Compare two version of files and apply changes to older file

I've been searching & googling a lot about this question, and I already know how to compare two files (hashes, checksums, etc.). But it's not quite what I need. What I need is described below. Lets assume I have a file and I've backuped it. Later…
GaaRa
  • 520
  • 6
  • 21
3
votes
2 answers

Comparing two files using perl md5

I wanted to run a code that continuosuly checks if a file exits if it exists then checks the files' MD5 against the previous MD5 . If there is some changes then it executes some code. But the perl MD% seems to be changing every time I call the…
Dexters
  • 2,419
  • 6
  • 37
  • 57
3
votes
2 answers

How to match similar filenames and rename so that diff tools like Beyond Compare see them as a pair to perform a binary comparison?

I'm looking for the best approach to comparing files that I believe are identical but which have different filenames. Comparison tools like BeyondCompare are great but they don't yet handle different filenames - when comparing files in separate…
3
votes
1 answer

How can I compare two files with same content but with different Host OS?

I am comparing two jar files that has the same content but they have different Host OS ( UNIX / FLAT ), as a result they get different CRC. How do I compare them without extracting them ? I do not want to extract the jar file because actually the…
Unkown
  • 61
  • 5
3
votes
1 answer

.NET Library for merging files

Do You know any .net library that can be used for comparing and especially merging of two files (like .pst) - would be the best if open-source or inexpensive.
michal zygula
  • 183
  • 2
  • 8
3
votes
0 answers

python3 filecmp returns False even tough files are identical

I wrote a python 3 script which checks if 2 output text files of C code are identical. 1 file is the "wanted" output text file which i got as an example of an input/output file with the assignment, and the other is the output file which my C code…
Yoni Newman
  • 185
  • 13
3
votes
1 answer

Does gtest support file comparison?

I want to add a unittest using gtest to test if my code can generate a file that are same with the reference file. Does gtest has a function to take two files and compare them?
superd
  • 305
  • 4
  • 10
3
votes
1 answer

SQL Job Step to Compare File Names

I have a folder which gets populated automatically with text files with names of SQL functions. I have another folder at a set location that has all the actual SQL functions in them. What I'm trying to do is come up with a SQL job that will look…
Aerobane
  • 85
  • 9
3
votes
2 answers

Compare local file and cloud file (using Dropbox with DropNet lib)

in C# I'm creating a client to sync local files and Dropbox folder, using DropNet lib. If the same file is present both in the cloud and in the local folders, how do I check if they are equivalent, or which of the two is more up to date? If I…
T. Phanelly
  • 189
  • 5
  • 17
3
votes
5 answers

Eclipse (3.5) how to compare files horizontally?

Normally Eclipse 'File Compare' compares files in vertical panels like: Is there a way I can compare them horizontally like: Compare using Horizontal Panel http://www.sqlservertool.com/images/ad_hex_diff_small.gif Its too tiring to scroll everytime…
lud0h
  • 2,370
  • 6
  • 33
  • 41
2
votes
2 answers

Batch file compare returning 0 when files are different

I use a scheduling system on a Windows 2003 server that requires batch files to run different jobs. I have one job that checks if a file exists, compares that the file is not empty, then does something based on the results. Each time I run this,…
MikeL
  • 79
  • 2
  • 12
2
votes
7 answers

How to find extra lines by comparing two files using php?

I have two files. First one has 482 lines. Second one has only 519 lines. I would like to find extra lines by comparing two files using php. Lets say my first file has lines like this Mango Orange Cherry Apple Blackberry And lets say my second…
Giri
  • 4,849
  • 11
  • 39
  • 48
2
votes
0 answers

GUI XML Comparison tool that parses the XML before diffing for Linux

I am looking for an XML comparison tool that will parse the XML before diffing for Linux (RHEL 5.7, Gnome). The files that I am diffing are 99% different in a line comparison but 85% the same after parsing. I have found ExamXML Pro which appears…
user1161495
  • 77
  • 1
  • 2
  • 10
1
2
3
10 11