[8.0b8-32] MRT, exclude ext in search/replace, .htaccess

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5807
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[8.0b8-32] MRT, exclude ext in search/replace, .htaccess

Post by *white »

HISTORY.TXT wrote:02.11.11 Added: Multi-rename tool: New option "[E]": If unchecked, the search string will be replaced only within the name part, and not the extension (32/64)
Tested OK using TC 8.0 beta 8 32-bit.

However when a file name starts with a dot (for example .htaccess), the file name is considered to be the extension.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Re: [8.0b8-32] MRT, exclude ext in search/replace, .htaccess

Post by *Sir_SiLvA »

white wrote:However when a file name starts with a dot (for example .htaccess), the file name is considered to be the extension.
wich is correct, so?
Hoecker sie sind raus!
User avatar
white
Power Member
Power Member
Posts: 5807
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [8.0b8-32] MRT, exclude ext in search/replace, .htaccess

Post by *white »

Sir_SiLvA wrote:
white wrote:However when a file name starts with a dot (for example .htaccess), the file name is considered to be the extension.
wich is correct, so?
If you say so. But then there is bug in the sorting:
HISTORY.TXT wrote:15.09.09 Fixed: Sort by extension: Ignore initial dot, e.g. a file named ".htaccess" has no extension
790
Junior Member
Junior Member
Posts: 31
Joined: 2009-04-22, 18:27 UTC

Post by *790 »

How to uncheck [E] forever? It`s comeback after reboot TC and I don`t need use it always.
TC 11.03, Win10x64
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

790 wrote:How to uncheck [E] forever? It`s comeback after reboot TC and I don`t need use it always.
a) wrong thread
b) uncheck e, save your setting under name and then
ini wincmd.ini under [configuratiion] enter the key >>MultiRenameLoadSettings=name<<
Hoecker sie sind raus!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

However when a file name starts with a dot (for example .htaccess), the file name is considered to be the extension.

wich is correct, so?
Hmm, that's really a good question. When double clicking a file, .htaccess really is handled as an extension. Also when you leave the name field empty and just put [E] in the extension field, you get .htaccess as the result. Therefore I think that w should keep it like this...
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5807
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:
However when a file name starts with a dot (for example .htaccess), the file name is considered to be the extension.

wich is correct, so?
Hmm, that's really a good question. When double clicking a file, .htaccess really is handled as an extension. Also when you leave the name field empty and just put [E] in the extension field, you get .htaccess as the result. Therefore I think that w should keep it like this...
In a Windows environment it does not make sense to have file names with one dot, located at the beginning. Because that means there is no file name. Windows Explorer even refuses to create such files. Have you ever encountered file names like ".exe" or ".doc"?

In a Unix environment file names with a dot at the beginning are common. It simply means the file is hidden. It does not denote to a file name extension.

I am sure that's the reason why you changed the sorting of these files by interpreting the names as file names and not as extensions without file name. Why does the same reasoning not apply for the multi-rename tool?

Following this reasoning the [E] mask and tc.ext plugin value should be changed as well.

Perhaps it is best to create an option to determine how to treat these files and create corresponding consistent behavior throughout the program.
Post Reply