Didn't work. Continues to take almost :30 minutes, then when it is finished, and I choose to delete anything in the active / inactive pane, it prompts me, there is nothing to delete.highend wrote:Not the script is slow, the computation of the md5 hashes is slow. Because XY does not support threading the entire application locks up while performing the hash calculations.
Just set the first variable to an empty string:Nothing more can be done to make it faster (apart from not using bytewise comparison and instead relying on file times, size, etc.).Code: Select all
$hash = "";
Compare Files & Delete
-
CookieMonster
Re: Compare Files & Delete
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Compare Files & Delete
I already gave you two options (status command / step) to see, why it's not working as it should.
Comparing two 3gb files on two partitions on my ssds is nearly instant ($hash = "") and the script is working flawlessly for me.
Comparing two 3gb files on two partitions on my ssds is nearly instant ($hash = "") and the script is working flawlessly for me.
One of my scripts helped you out? Please donate via Paypal
-
CookieMonster
Re: Compare Files & Delete
Code: Select all
foreach ($file, $processList, "|") {
status "Processing file: $file", , "progress";
if (strpos($haystackList, $file) != -1) {Edit: The script is way faster then it was after doing the script edit.
-
CookieMonster
Re: Compare Files & Delete
Can you show me the script in action as a video, as it's working for you.
-
admin
- Site Admin
- Posts: 66294
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
CookieMonster
Re: Compare Files & Delete
The script worked on, one file. After what felt like I was fighting with it, the point of the video is to compare.
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Compare Files & Delete
Sorry, more important things to do than capturing videos for file comparing...
1. When you think that the first version of the script is faster than the generic one, just use that (I don't see any differences that makes the first one faster but anyway...)
2. What takes time is the filesequal() command. If it takes too long, just rewrite it to compare e.g. size, created + last modified time to see if files are different.
1. When you think that the first version of the script is faster than the generic one, just use that (I don't see any differences that makes the first one faster but anyway...)
2. What takes time is the filesequal() command. If it takes too long, just rewrite it to compare e.g. size, created + last modified time to see if files are different.
One of my scripts helped you out? Please donate via Paypal
-
CookieMonster
Re: Compare Files & Delete
The only way was to show in a demonstration, I hope we can find a solution 
-
Biggynuff
- Posts: 110
- Joined: 13 May 2010 14:08
Re: Compare Files & Delete
highend,
This script is beautiful! Thank you very much.
I've added it to a toolbar button I use with a collection of useful scripts.
XY completely rocks

This script is beautiful! Thank you very much.
I've added it to a toolbar button I use with a collection of useful scripts.
XY completely rocks
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Compare Files & Delete
Thanks.
I'll upload a new version later today / tomorrow.
If $showFilesBeforeDelete is set to 1 (default), you'll get a list of files in a text popup (the selection takes place as well).
It's also able to show exactly which files are missing (in comparison to the other pane).
Apart from that it allows to compare manually selected files as well (the current version will use all files on both panes).
Made a new topic for the improved script.
See: http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=10044
I'll upload a new version later today / tomorrow.
If $showFilesBeforeDelete is set to 1 (default), you'll get a list of files in a text popup (the selection takes place as well).
It's also able to show exactly which files are missing (in comparison to the other pane).
Apart from that it allows to compare manually selected files as well (the current version will use all files on both panes).
Made a new topic for the improved script.
See: http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=10044
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club