[Bug] Folder "extensions"

Questions, glitches, bugs and crashes
Locked
User avatar
swoop
Posts: 54
Joined: Thu Mar 02, 2017 2:40 pm
Location: Brussels, Belgium

[Bug] Folder "extensions"

Post by swoop » Sun Mar 05, 2017 9:20 am

I'm bot sure if this in intentional or a bug, but folders are not treated as extension-less entities.

This results in unexpected folder sorting order. See first attachment.
- If this is by design, could an option be added to Preferences to tread folders as extension-less
- if this is a bug, well parsing extensions should not be done ;)
folder.sorting.png
folder.sorting.png (23.94 KiB) Viewed 15510 times

Another side effect is that multi rename tool tries and adds dot to folder names. See second attachment.
- in this case extension-less concept makes even more sense
- the same is the case for .dot files
- (extreme, Windows-like, measure could be separating extension from name - in style of TC)
folder.remanimg.png
folder.remanimg.png (54.52 KiB) Viewed 15510 times
Total Commander (Windows 95 - Windows 7) (retired for Mac)
Nimble Commander (retired Crax, Commander One, DCommander)
Macbook 12" 2016 - macOS High Sierra

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: [Bug] Folder "extensions"

Post by mike » Sun Mar 05, 2017 9:40 am

Well, in current screenshot, the Batch Rename does exactly what it's asked to do:
[N].[E] - i.e. "put file name", "put '.' sign", "put file extension".
Extensions are empty in provided example, that's right, but "." sign in pattern string is not going anywhere.

It's possible to add some additional checking and switch to "[N]" pattern when all source items have no extension.
However, this can't work all the time - you can select some items with extensions and some other items without extensions simultaneously, so they simply can't be processed uniformly.

So there's no "right" answer to this issue, unfortunately. Or, at least, I can't see it.

BTW, there's no difference between "files" and "folders" in terms of having or not having an extension.

User avatar
swoop
Posts: 54
Joined: Thu Mar 02, 2017 2:40 pm
Location: Brussels, Belgium

Re: [Bug] Folder "extensions"

Post by swoop » Wed Mar 29, 2017 8:23 pm

mike wrote:
Sun Mar 05, 2017 9:40 am
BTW, there's no difference between "files" and "folders" in terms of having or not having an extension.
Indeed, to the system those are just names that coincidentally contain one or more "dots." Logically (from human point of view), it (might) be seen differently, though.

mike wrote:
Sun Mar 05, 2017 9:40 am
Well, in current screenshot, the Batch Rename does exactly what it's asked to do:
[N].[E] - i.e. "put file name", "put '.' sign", "put file extension".
Extensions are empty in provided example, that's right, but "." sign in pattern string is not going anywhere.

It's possible to add some additional checking and switch to "[N]" pattern when all source items have no extension.
However, this can't work all the time - you can select some items with extensions and some other items without extensions simultaneously, so they simply can't be processed uniformly.

So there's no "right" answer to this issue, unfortunately. Or, at least, I can't see it.
I fully agree that there's no "right" answer and I also think that complex solution will only shoot us (you) in the leg in the long run.
So what if we just enable users to instruct NC to do what is needed. It can be done by including "[A] Full name" button in the UI. I'm suggesting [A] instead of [N], because sometimes folders contain '.' and use of [N] would trim part of the full name. I know [A] already is available, but it is buried in Other section. For extra explanation see picture below.
find.files.dialog.png
find.files.dialog.png (163.25 KiB) Viewed 15441 times

Regarding unexpected sorting:
NC sees folders as extension-rich (as opposed to extension-less) items and that leads to unexpected sorting (see original post above).
I do not want to suggest changes to items model or underlying parser that feeds that model, therefore maybe a simple option to the sorting would solve the issue (comparer could evaluate [A] iso [E]->[N] for folders). For possible option checkbox see picture below.
ignore.dir.extensions.png
ignore.dir.extensions.png (151.91 KiB) Viewed 15441 times
Total Commander (Windows 95 - Windows 7) (retired for Mac)
Nimble Commander (retired Crax, Commander One, DCommander)
Macbook 12" 2016 - macOS High Sierra

User avatar
swoop
Posts: 54
Joined: Thu Mar 02, 2017 2:40 pm
Location: Brussels, Belgium

Re: [Bug] Folder "extensions"

Post by swoop » Wed Apr 12, 2017 7:44 am

@mike
Could you comment if this would be possible? It really is annoying, especially when many video processing tools add "dots" as name / season / episode / resolution separator and the order in lists is all mixed up (to name one occurrence). Thanks!
Total Commander (Windows 95 - Windows 7) (retired for Mac)
Nimble Commander (retired Crax, Commander One, DCommander)
Macbook 12" 2016 - macOS High Sierra

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: [Bug] Folder "extensions"

Post by mike » Wed Apr 12, 2017 8:45 am

swoop, sorry for postponing the issue.

Ok, backing to the topic, we're talking here about directories being extension-rich vs. extension-less, right?
The most straightforward solution for the situation described before, IMHO, might be adding here (and to Menu->View->Sorting) a new sorting option like "Ignore Folders' Extensions", turned off by default.
Screen Shot 2017-04-12 at 15.36.37.png
Screen Shot 2017-04-12 at 15.36.37.png (45.47 KiB) Viewed 15398 times
Would it be sufficient?
(I personally think that such workaround is a horrible-horrible thing, and can only be excused by an existing awful naming practice. And this will not solve the broken sorting for regular files - they too are affected by the name.season.episode.resolution naming scheme)

User avatar
swoop
Posts: 54
Joined: Thu Mar 02, 2017 2:40 pm
Location: Brussels, Belgium

Re: [Bug] Folder "extensions"

Post by swoop » Thu Apr 13, 2017 1:41 pm

mike wrote:
Wed Apr 12, 2017 8:45 am
swoop, sorry for postponing the issue.
No problem, Mike! It's great that you are so open to suggestions.
mike wrote:
Wed Apr 12, 2017 8:45 am
Ok, backing to the topic, we're talking here about directories being extension-rich vs. extension-less, right?
The most straightforward solution for the situation described before, IMHO, might be adding here (and to Menu->View->Sorting) a new sorting option like "Ignore Folders' Extensions", turned off by default.

Would it be sufficient?
Sufficient (just), it would be. But I'd like to bring to your attention that this might bring additional confusion. Because it would be enabled per pane, the behaviour might be different in panes - that might lead to a few folders being still sorted at the bottom of folder list. Therefore, I believe the most appropriate place might be preferences (as I originally suggested). Just my two cents.
[Btw, when I started using NC, I was not aware that Show Hidden Files, Numeric comparison, etc. are per-pane settings and I was wondering where are my files and what is wrong with the sorting... ;)]
mike wrote:
Wed Apr 12, 2017 8:45 am
(I personally think that such workaround is a horrible-horrible thing, and can only be excused by an existing awful naming practice. And this will not solve the broken sorting for regular files - they too are affected by the name.season.episode.resolution naming scheme)
You are absolutely right. Luckily, many (maybe even vast majority) regular files have extension and then sorting is as expected. Maybe take a look at dot files. That might be an interesting corner case.

In addition:
Would it be possible to add that "[A] Full Name" button to Search window? It only makes sense on *NIX system such as macOS. [See screenshot in previous post]
Total Commander (Windows 95 - Windows 7) (retired for Mac)
Nimble Commander (retired Crax, Commander One, DCommander)
Macbook 12" 2016 - macOS High Sierra

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: [Bug] Folder "extensions"

Post by mike » Mon Apr 17, 2017 4:03 am

I've added an "Extensionless Folders" sorting option:
Screen Shot 2017-04-17 at 10.45.58.png
Screen Shot 2017-04-17 at 10.45.58.png (79.59 KiB) Viewed 15369 times
swoop wrote:
Thu Apr 13, 2017 1:41 pm
Sufficient (just), it would be. But I'd like to bring to your attention that this might bring additional confusion. Because it would be enabled per pane, the behaviour might be different in panes - that might lead to a few folders being still sorted at the bottom of folder list. Therefore, I believe the most appropriate place might be preferences (as I originally suggested). Just my two cents.
[Btw, when I started using NC, I was not aware that Show Hidden Files, Numeric comparison, etc. are per-pane settings and I was wondering where are my files and what is wrong with the sorting... ]
That's an old story of flexibility vs. generality...
Currently NC tends to shift the balance toward flexibility, yes, sometimes with a cost of a more complex model and a steep learning curve.
swoop wrote:
Thu Apr 13, 2017 1:41 pm
Would it be possible to add that "[A] Full Name" button to Search window? It only makes sense on *NIX system such as macOS. [See screenshot in previous post]
Will do, but it'll take some time - at the moment Batch Rename has only a rudimentary support for a Full Name [A] placeholder.

User avatar
swoop
Posts: 54
Joined: Thu Mar 02, 2017 2:40 pm
Location: Brussels, Belgium

Re: [Bug] Folder "extensions"

Post by swoop » Thu Apr 20, 2017 10:17 pm

mike wrote:
Mon Apr 17, 2017 4:03 am
I've added an "Extensionless Folders" sorting option:
Screen Shot 2017-04-17 at 10.45.58.png
That's massive!
mike wrote:
Mon Apr 17, 2017 4:03 am
Will do, but it'll take some time - at the moment Batch Rename has only a rudimentary support for a Full Name [A] placeholder.
Understood. Thanks for your consideration!
Total Commander (Windows 95 - Windows 7) (retired for Mac)
Nimble Commander (retired Crax, Commander One, DCommander)
Macbook 12" 2016 - macOS High Sierra

Locked