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
2
votes
2 answers

XSLT: XPath comparison between two files

I would like to compare two XML-files via XSLT. The comparison should be considered to be successful if all elements of a specific type in document 1 are located at the same XPath position in document 2. Consider
Matt
  • 23
  • 3
2
votes
5 answers

Large text file editor with compare feature?

I'm trying to compare 2 large text files around 500MB each, I've tried to use Notepad++, Textpad, VIM etc and couldn't get them to even open the text file. Either that, or the editors that DO work don't have the compare feature. I need to see what…
Ricky
  • 21
  • 1
  • 2
2
votes
1 answer

Compare two versions of the same folder and get names of files that differs

Suppose I have following simplified files structure main_folder |__ foo.json | |__ sub_folder |__bar.json I have two copies of the main_folder, e.g. main_folder_v1 and main_folder_v2 I want to compare both versions and get…
Andersson
  • 47,234
  • 13
  • 52
  • 101
2
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
  • 175
  • 13
2
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
  • 135
  • 10
2
votes
1 answer

How to compare file sizes for two different dates in Linux by using Python3

I'm a newbie in python and I will backup my server data everyday. I use shell script to check my backup dates, but when the Web Host become more and more using shell script need to change a lot. So, I want to use python to check my backup file. My…
Kai Kudou
  • 43
  • 1
  • 6
2
votes
1 answer

NSFileManager contentsEqualAtPath:andPath: compare checksum data

Does the NSFileManager method contentsEqualAtPath:andPath: create a dynamic checksum to compare two files, does it open the file header and compare file header details or does it use some other method for comparing? I have a list of 200,000 or so…
Hooligancat
  • 3,025
  • 1
  • 35
  • 54
2
votes
5 answers

C# file comparison utility

Can you recommend a good file comparison utility that is able to handle C# very well. I have tried both WinMerge, BeyondCompare and KDiff and they are not good enough, e.g. if I have functions with the same name but placed in different areas of the…
kjv
  • 10,117
  • 33
  • 94
  • 138
2
votes
2 answers

.Except() in compare methode do not view all files?

I develop a little software which permits me to compare 2 folders and Add files. I take principally code from msdn. That looks to work fine with some files but I have some troubles with 2 folders (292 and 268 files). In my case with the 2 big folder…
Bloops
  • 45
  • 3
2
votes
1 answer

Match two files against each other and write output as file - Python

I'm new to Python. My second time coding in it. The main point of this script is to take a text file that contains thousands of lines of file names (sNotUsed file) and match it against about 50 XML files. The XML files may contain up to thousands of…
Mo2
  • 921
  • 4
  • 11
  • 24
2
votes
4 answers

Bash: tell if a file is included in another

I'm trying to compare the content of two files and tell if the content of one is totally included in another (meaning if one file has three lines, A, B and C, can I find those three lines, in that order, in the second file). I've looked at diff and…
gregseth
  • 12,078
  • 14
  • 53
  • 92
2
votes
3 answers

Stuck in writing my diff utility in C++

I was trying to use what i have learned about file and resource handling in C++: I would like to write a diff-like utility. Here It is my latest version #include #include #include int main(int argc, char* argv[]) { …
user1802174
  • 263
  • 2
  • 9
1
vote
2 answers

How to insert only new and/or updated lines into another file

First days dealing with Perl and blocked already :) Here's the situation: a file is updated in folder A but also exists in folders B, C & D and, to make it easier, it can be different in all of them so I can't just do a diff. New lines that are…
1
vote
1 answer

Backup dirs and subdirs using Python; Use os.walk or filecmp.dircmp, or something else

I am a python newbie. My question is what approach I should use to set up a file/directory backup routine, as described below (os.walk or filecmp.dircmp, or something else). I want to set up a backup routine as follows: Every night, I want to…
Marc B. Hankin
  • 667
  • 3
  • 13
  • 22
1
vote
1 answer

Trying to find if an element in one file exists in another file

Im still new to python so ill try my best to explaining what I have done So basically my code asks the user for input it then imports a text file which contains words and each word is in a separate line, my code then store the users input in a…
Salman
  • 11
  • 1
1 2
3
9 10