Wrong count

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
MSpagni
Expert Member
Posts: 422
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Wrong count

Post by MSpagni »

I use EDP to manage my backups, so it happens that I'm comparing two 1 TB disks.
Both disks are equal (now) and they have 31 subdirs in the root (not counting "System Volume Information").
With "do not compare sudirectories at all" EDP says: total: 31 directories, 3 files. Good.
With "compare sudirectories recursively" EDP says: total: 18 directories, 127695 files. :?:

N.B. EDP 32 bits.

User avatar
psguru
Site Admin
Posts: 1902
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Wrong count

Post by psguru »

With "do not compare sudirectories at all" EDP says: total: 31 directories, 3 files. Good.
With "compare sudirectories recursively" EDP says: total: 18 directories, 127695 files.
Does you folder recursively contain 18 empty directories and 127695 files? I have no way of knowing it but it sounds like you expected a different result.
psguru
PrestoSoft

MSpagni
Expert Member
Posts: 422
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Wrong count

Post by MSpagni »

I have no way of knowing it but it sounds like you expected a different result.
Ehm... yes!
I didn't expect the number of directories should change. Or, perhaps, it could become much bigger. :o
Subdirectories of the root: 31 were and 31 still are.
Does you folder recursively contain 18 empty directories and 127695 files
May I suggest to add that little word to the caption? :)

JeremyNicoll
Expert Member
Posts: 77
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Wrong count

Post by JeremyNicoll »

Surely anyone would expect a different result? How can the total number of directories, when they are all looked at, be less than when only one level are?

Perhaps MSpagni could also say what the counts seen by File Explorer are?

I'm aware that my current version of EDP is well out of date, so although I think I have just seen the same thing, I'm not explicitly reporting that as a bug - maybe what I just saw was fixed at some point? I created a test directory called EDPtest and in that created 8 folders. In just one of those, "Folder 004", I created 7 subfolders. In "SubFolder 005" (only) there's a few empty text files. I copied \EDPtest from one drive to another then compared them. First, see what "dir" says:

C:\>dir /b e:\edptest
Folder 001
Folder 002
Folder 003
Folder 004
Folder 005
Folder 006
Folder 007
Folder 008

C:\>
C:\>dir /b "e:\edptest\folder 004"
SubFolder 001
SubFolder 002
SubFolder 003
SubFolder 004
SubFolder 005
SubFolder 006
SubFolder 007

C:\>
C:\>dir /b "e:\edptest\folder 004\subfolder 005"
New Text Document - Copy (2) - Copy.txt
New Text Document - Copy (2).txt
New Text Document - Copy.txt
New Text Document.txt

C:\>

When I ask File Explorer to show me the properties of \EDPtest, it says there's 4 files and 15 folders. EDP when not looking recursively tells me that there's 8 folders - which matches my "Folder 001" - "Folder 008". But when I ask for a recursive check I get told there's only 13 directories & 4 files.
Bad enough that the count is wrong, but two folders, "Folder 004" and "SubFolder005" don't even appear in the results. These are, of course, the ones that have contents.

See: https://www.dropbox.com/s/s44pkl5h3fwug ... s.jpg?dl=0
Last edited by JeremyNicoll on Sun Oct 13, 2019 1:45 am, edited 1 time in total.

JeremyNicoll
Expert Member
Posts: 77
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Wrong count

Post by JeremyNicoll »

"Empty"?

But (in my example) when recursion is not active, EDP reports "Total: 8 directories". Seven of those are empty, but one (Folder 004) has contents.

Why would counting of directories not count all of them, every time?

JeremyNicoll
Expert Member
Posts: 77
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Wrong count

Post by JeremyNicoll »

It's hard to believe that something as basic as a count would fail.

How on earth does something like this make its way through testing?

MSpagni
Expert Member
Posts: 422
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Wrong count

Post by MSpagni »

Out of curiosity, I checked my drive and counted 18 empty directories.
Hardly surprising. :?
Why would counting of directories not count all of them, every time?
Because, if I remember well, the definition of "empty" of EDP depends on the "ignores" and/or is a bit odd.
Look at this thread: https://www.prestoforums.com/viewtopic. ... ries#p5217

JeremyNicoll
Expert Member
Posts: 77
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Wrong count

Post by JeremyNicoll »

The definition of 'empty' depends on ignores...? Are these are the ignores in the Text Comparison options? None of them are active. Even if they were, how would they affect directory comparisons?

Unless... are you saying that if EDP for some reason ignored all of the content of some files in a directory (though all the files I have in my test are already empty), it'd somehow think that directory is 'empty' and not show it? But at the same time it does show the files themselves?

I added a non-empty file to Subfolder 005, alongside the empty text files.

The recursive comparison now shows 5 files and 13 directories. Also, there's no filtering of either items to be compared, or the view, going on.

If the "Total: nnn directories, mmm files" message was altered to say "Total: ttt directories (eee empty), mmm files" that would be useful but it doesn't solve the problem of why some directories are not listed in the view. Normally I'd expect to be able to double-click any directory's icon to open a subsidiary EDP window showing just that directory being compared ... and if it's not there I can't do that.

User avatar
psguru
Site Admin
Posts: 1902
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Wrong count

Post by psguru »

May I suggest to add that little word to the caption? :)
Recursive comparison can only show empty directories (if this is enabled), so the word "empty" in unnecessary. The next version will have "File older (empty)" instead of "File folder".
psguru
PrestoSoft

User avatar
psguru
Site Admin
Posts: 1902
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Wrong count

Post by psguru »

When I ask File Explorer to show me the properties of \EDPtest, it says there's 4 files and 15 folders. EDP when not looking recursively tells me that there's 8 folders - which matches my "Folder 001" - "Folder 008". But when I ask for a recursive check I get told there's only 13 directories & 4 files.
Bad enough that the count is wrong, but two folders, "Folder 004" and "SubFolder005" don't even appear in the results. These are, of course, the ones that have contents.
Again, in recursive comparison only empty directories are counted. What you see in the small status bars is the summary of the view above: 13 folders, 4 files. "Folder 004" and "SubFolder005" are not visible because they are not empty, and their files are shows in the results.
psguru
PrestoSoft

User avatar
psguru
Site Admin
Posts: 1902
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Wrong count

Post by psguru »

If the "Total: nnn directories, mmm files" message was altered to say "Total: ttt directories (eee empty), mmm files" that would be useful but it doesn't solve the problem of why some directories are not listed in the view. Normally I'd expect to be able to double-click any directory's icon to open a subsidiary EDP window showing just that directory being compared ... and if it's not there I can't do that.
Showing empty directories in recursive comparison is optional, as you probably know, and it's off by default. The message you suggest would only make sense in non-recursive comparison (there are no non-empty folders in recursive comparison), but then again, EDP does not spend time to calculate empty/non-empty in that mode, and what would be the benefit of knowing that some folders are empty in non-recursive comparison?
psguru
PrestoSoft

JeremyNicoll
Expert Member
Posts: 77
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Wrong count

Post by JeremyNicoll »

psguru wrote:
Sun Oct 13, 2019 4:00 pm
Showing empty directories in recursive comparison is optional, as you probably know, and it's off by default. The message you suggest would only make sense in non-recursive comparison (there are no non-empty folders in recursive comparison), but then again, EDP does not spend time to calculate empty/non-empty in that mode, and what would be the benefit of knowing that some folders are empty in non-recursive comparison?
Showing empty... is on, here.

> "there are no non-empty folders in recursive comparison"
- by which you mean that your display can only show recursive contents of some folder if it actually has contents, which does make sense.

But I think in some ways you're "too close" to the nuances of comparing things. Maybe it's naive, but generally if I'm comparing two lists of anything, I want to see all the items in both lists and their corresponding statuses. If I choose to exclude things from the lists I can choose to filter what's considered or let all the comparisons occur and then filter the display ... but then, I know I did that.

If folders that I know exist don't show up in a list, then I wonder if other things which should have been there are for some reason not shown - and that removes my confidence in the display. EDP is very clever, but in all that cleverness there's already considerable scope for a user confusing themselves by forgetting which options are set which way. For that reason I tend most of the time to have "show everything" and "compare stuff in great detail" set, because I'm not that bothered if a compare takes a bit longer, but I /really/ want to know if things that I expect to be the same are not. Also, time issues are a lot less relevant for me now that all my machine's disks are SSDs. A comparison tool is after all often used to make sure that all the files/folders you look at are in the right state, and that certainly includes being present.

It seems to me that it would be simple to have every folder, empty or not, show up in the results list. You already know whether or not there's any point in recursing into each one. Bear in mind that if I use the very simple "dir /s" command it will show me every folder, empty or not.


> what would be the benefit of knowing that some folders are empty in non-recursive comparison?

Seriously? Your product already DOES tell me that. It lets me see if lefthand and righthand pairs of matchining folders have the same empty/not empty state.

I think you're forgetting that when someone compares a set of folders and files they do so after they've done something or other to one set of them (or maybe both sets). Suppose I'd just run some tool that was meant to empty out some directories but not others. I might be using EDP to check that the expected differences are present but no unexpected ones are there. I definotely want to see that empty directories are there, and that they are where I expect them to be.

User avatar
psguru
Site Admin
Posts: 1902
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Wrong count

Post by psguru »

It looks like there is a misunderstanding of recursion in EDP.

In the non-recursive mode EDP compares and shows top level folders and files. It doesn't display any lower level items (that requires double-clicking on a folder, which starts a new comparison).

In the recursive mode EDP compares and shows all items under the top pair of folders (of course, the user can limit the compared sets by applying filters). It does not show folders. All folders that have compared files are represented in the Relative Path column. If a folder has no files, it would normally not be represented except that EDP has an option to show it.
psguru
PrestoSoft

JeremyNicoll
Expert Member
Posts: 77
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Wrong count

Post by JeremyNicoll »

OK, I'll need to install a more uptodate version of EDP to find out whether I'm seeing behaviour that's since been fixed.

Last time around I got in a mess, having installed it (an early V9 version) under my admin id, and then found the plugins weren't defined for my day-to-day id. You may recall the discussion: https://www.prestoforums.com/viewtopic.php?f=3&t=2097

I do realise that EDP has had stuff fixed since then, but have put-off trying again. In between times someone died and I had a house to clear, and I'm chronically ill myself so there just hasn't been an opportunity to do this, carefully.

Nevertheless, a quick read through that thread suggests that there was, then, no way to install EDP once, for all users. Does that mean that if I want it to work from both my admin id and my day-to-day id, I need to run the installer twice, once from each id? I don't however want to have two sets of all the EDP source code, plugins etc. How is it mean to be done?

MSpagni
Expert Member
Posts: 422
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Wrong count

Post by MSpagni »

psguru wrote:
Sun Oct 13, 2019 3:51 pm
Recursive comparison can only show empty directories (if this is enabled),
That's ok. Nothing to object.
psguru wrote:
Sun Oct 13, 2019 3:51 pm
so the word "empty" in unnecessary.
I disagree on this. I mean: I was indeed fooled (don't count on my memory! :wink: ) and, as I wrote, to add a little word isn't such a big effort. :)
psguru wrote:
Sun Oct 13, 2019 3:51 pm
The next version will have "File older (empty" instead of "File folder".
Sorry but I don't understand. What does it mean? Where is it written?
What I mean is simply to change the caption in the lower left corner of a pane that says "Total: xx directory, yy files" with "Total: xx empty directory, yy files" to make things straight also for absent-minded like me. Of course only in recursive mode.
That's all.

Post Reply