Slight change to Edit | Compare
-
grindax
Re: Slight change to Edit | Compare
.
Last edited by grindax on 22 Jan 2016 23:00, edited 1 time in total.
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: Slight change to Edit | Compare
Mmh, getting back to the topic of comparing files, I realize that the Compare... commands have smartness built in (they check file size first, and then a small chunk at the beginning and end of the file before going "brute force" bit-per-bit). What if such smartness was available via a scripting function too? Then multiple files could be compared at once, it would be trivial for a scripter setting up a foreach loop that aborts as soon as one file looks different from the other scanned.
AFAICS, there's not a filecompare() function. And comparing hashes is not exactly the same thing, due to (un/likely) collisions.
AFAICS, there's not a filecompare() function. And comparing hashes is not exactly the same thing, due to (un/likely) collisions.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Slight change to Edit | Compare
The code is already there (since 20110321Marco wrote:Mmh, getting back to the topic of comparing files, I realize that the Compare... commands have smartness built in (they check file size first, and then a small chunk at the beginning and end of the file before going "brute force" bit-per-bit). What if such smartness was available via a scripting function too? Then multiple files could be compared at once, it would be trivial for a scripter setting up a foreach loop that aborts as soon as one file looks different from the other scanned.
AFAICS, there's not a filecompare() function. And comparing hashes is not exactly the same thing, due to (un/likely) collisions.
Code: Select all
comparefiles(file1, file2, [hash])FAQ | XY News RSS | XY X
XYplorer Beta Club