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
1
vote
1 answer

Python 2.7 filecmp.cmp returns false even though the gzipped files are identical

I'm comparing a bunch of fastq.gz files. Each file is ~4G: if filecmp.cmp(f1,f2,shallow=False) It returns false, as in f1 and f2 are different. But when I compare the files using diff/comm I get 0 output (I unzip and then compare). I tried both…
FairyDuster
  • 145
  • 3
  • 13
1
vote
1 answer

Open two files for comparison

From Solution Explorer, I'd like to select two C# code files for textual comparison. I have got WinMerge installed on my machine, which accepts multiple file names on the command line. So I tried to use Open With... command and add WinMerge to the…
dotNET
  • 33,414
  • 24
  • 162
  • 251
1
vote
3 answers

Python 2.7 - Compare two text files and write only the unique values from first file

I am trying to do the following. Compare two text files ( Masterfile and usedfile) and write the unique values(not common in both) of Masterfile to third file (Newdata ). Both files have one word in each line. example: Masterfile…
Joe_12345
  • 589
  • 2
  • 7
  • 19
1
vote
1 answer

Verify if the uploading file is as same as the downloaded file

In java is there a way to verify if the user uploading file is as same as the one he just downloaded (other than by using the file name). For an example, if the user is given a certain template to download and fill, and then upload the same, How can…
Sandun Chathuranga
  • 2,242
  • 2
  • 13
  • 27
1
vote
1 answer

Python filecmp returns false on binary equal files

I have a zip file and a directory. The files contained within the zip file shall be copied to the directory if they do not exist within the directory or if they differ (not binary equal). So there are the following two cases. The file from the zip…
Lilo
  • 341
  • 2
  • 14
1
vote
1 answer

Fastest way to find lines in file1 which contains any keywords from file2?

I have two files. The first file has three hundred thousand records shown example (file1) and second file has one hundred thousand records, shown example (file2). I am basically doing a grep of each entry on file2 with file1 and retrieve all that…
BBJinu
  • 77
  • 6
1
vote
2 answers

Comparing lines in two files to remove if they equal

I'm opening two files - one that contains the new file for comparison and one that contains the buzz words I need to remove from this file. I have this as a function so far: def remove(file, buzz): #outer for loop cycles through the buzz file …
user131935
  • 11
  • 3
1
vote
1 answer

How to compare if the two newest files in a directory are identical using a shell script?

I'm looking for a simple way to have an if statement where the conditional is whether the 2 newest files in a given directory (recursively) are identical in contents.
GJ.
  • 5,226
  • 13
  • 59
  • 82
1
vote
1 answer

Beyond Compare - Finding number of line differences rather than byte differences when using Folder Compare

So I am using Beyond Compare 4.0.7 and am comparing two folders containing different versions of a Java project. I want to find how many lines have been changed to class files in the newest project. So I filter by *.class files, view differences…
1
vote
1 answer

How to compare 2 text files (content) without loop in Java?

Is there any way to compare 2 text (ODT) files without using loops? The point is, inside a servlet, I'm receiving a file from JavaScript and I want to compare it with another stored in the server. This is what I'm doing, but it isn't working, it…
Drumnbass
  • 867
  • 1
  • 14
  • 35
1
vote
1 answer

Sublime text 2: difference between Sublimerge vs FileDiffs plugins

I want to do some file comparison in Sublime Text 2, I have done a bit of research and found out that: Sublime text has a built-in diff feature but its features are limited open a folder (Click "File" | "Open Folder..." And choose a folder at a…
Adriano
  • 19,463
  • 19
  • 103
  • 140
1
vote
2 answers

Comparison of folders with Beyond Compare Script

I would like to have a Beyond Compare script that compare the file contents of two folders and produce a text-report. How can I do this? Using the text-report only compares two files. The folder-report does not compare the file contents. thanks
pinker
  • 1,283
  • 2
  • 15
  • 32
1
vote
1 answer

Compare files within folders between local computer and remote server

I have one folder on my computer and one folder on a remote server, I transferred a large number of files but for some reason I have now 2 more files in my own folder than on the server so I would like to check which ones these are instead of going…
Fraukje
  • 673
  • 3
  • 20
1
vote
2 answers

Graphical diff viewer between local and repo file

Here is my use case. I want to compare a local file i am working on with a repo file using a diff viewer. For example file 1 : /path-to-local-file-in-my-computer file 2 : http://core.svn.wordpress.org/trunk/wp-load.php Is there any program that can…
1
vote
1 answer

Compare files on server?

So my site got hacked, I thought that I managed to fix all the files and set it back up. However, the hacker managed to leave some kind of backdoor, and my site was hacked again. My site is built with wordpress, so I want to compare the clean…
user1537415