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.

146 questions
1
vote
1 answer

How to restore the Visual Studio Compare/Merge tool?

I am using Microsoft Visual Studio Professional 2017. I installed KDiff3 compare tool (version 0.9.98) in in my local machine. Now, by default, file comparison (.cs extension) in Visual Studio is happening in KDiff, unlike earlier when it used to…
1
vote
1 answer

Is there API for files comparison in vscode

Since file comparison can be executed from vscode using at least a couple of ways that I am aware of: code --diff file1 file2 command palette: "File: Compare Active File With..." I was wondering if there could be an api for comparing two files…
Andrei
  • 115
  • 1
  • 7
1
vote
2 answers

Compare two excel files in python

import xlrd wb_1 = xlrd.open_workbook('Book1.xls', on_demand=True) ws_1 = wb_1.sheet_by_name('Sheet3') wb_2 = xlrd.open_workbook('Book2.xls', on_demand=True) ws_2 = wb_2.sheet_by_name('Sheet3') for i in range(ws_1.ncols): col_value1 =…
kar_n
  • 78
  • 7
1
vote
2 answers

How to create a os.walk() function which compares the folders and subfolders of two directories?

here‘s my problem: Let‘s say I want to create a file syncing function that goes through all the folders and subfolders of two similar directories and detects all the common folders/subfolders of those two directories. I gave it a try by combining…
1
vote
2 answers

CSV File Comparison Algorithm in Python3

I am working on creating a CSV file comparator which can compare files which are more than 300 MB. I have created a the first version which can Compare 2 Large CSV files in which the columns can be in any order but the rows need to be in the exact…
Arijit Das
  • 89
  • 1
  • 1
  • 12
1
vote
0 answers

Command prompt to compare different xml-files in different folders to check differences

I am in a situation where I have a certain bat.file that creates xml-messages. However when me and my colleague use the same data and the same tool to create the messages the amount of the xml-messages aren't the same (they differ with one message).…
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
  • 2
  • 12
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
  • 28,678
  • 19
  • 120
  • 206
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
  • 381
  • 5
  • 15
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,094
  • 2
  • 10
  • 26
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
  • 331
  • 2
  • 13
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.
  • 4,913
  • 10
  • 54
  • 76
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…
Adrien Be
  • 17,566
  • 15
  • 96
  • 134
1
vote
2 answers

How do write filecmp's report_full_disclosure() to a text file?

I'd like to output a series of dircmp report_full_disclosure()'s to a text file. However the report_full_disclosure() format is one blob of text, it doesn't play nicely with file.write(comparison_object.report_full_disclosure()) because file.write()…
Dylan Pierce
  • 3,147
  • 1
  • 26
  • 35