String replacement in folder names with a dot causes duplications in the folder name

You found an error in the program ? Report it here
Post Reply
Kapano
Posts: 1
Joined: 2019-03-11 08:20:44

String replacement in folder names with a dot causes duplications in the folder name

Post by Kapano »

String replacement in the name of a folder which contains a dot causes AntRenamer to duplicate the dot and everything after the dot multiple times.

Steps for reproducing the bug:
  • Create a folder with the name "a.1"
  • Open AntRenamer
  • Add the folder "a.1" to AntRenamer
  • Go to the window "Actions"
  • Click on the list item "String replacement"
  • Enter "a" in the text field "Search for"
  • Enter "b" in the text field "Replace by"
  • Leave every other checkbox unmarked
  • Click the button "Go"
Expected Result: "b.1"
Actual Result: "b.1.1"
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: String replacement in folder names with a dot causes duplications in the folder name

Post by antp »

Hi,
There is indeed a bug somewhere with folders containing a dot.
This may be related to the fact that the part after the dot is handled like an extension, but for folders this behaviour was lost and is unexpected.
I probably forgot to handle something somewhere, it is on my to-do list, I have to fix it some day.
wwcanoer
Posts: 1
Joined: 2024-04-25 01:56:13

Re: String replacement in folder names with a dot causes duplications in the folder name

Post by wwcanoer »

This problem still exists in ver 2.12

Action: String Replacement: Programs-Source to PrSo

It did do that but it also changed folder names:

Q:\P8B\PS\PS\ProgramFiles-Source MM-Data\Hardware\Netgear-MP101\MP101_S3_3_36_us\NETGEAR Media Server 3.3.36 renamed to NETGEAR Media Server 3.3.36.36

Q:\P8B\PS\PS\ProgramFiles-Source MM-Data-SG\Hardware\Netgear-MP101\MP101_S3_3_36_us\NETGEAR Media Server 3.3.36 renamed to NETGEAR Media Server 3.3.36.36

Q:\P8B\PS\PS\Programs-Palm\PalmDesktop4.1 renamed to PalmDesktop4.1.1

Q:\P8B\PS\PS\Programs-Palm 2\PalmDesktop4.1 renamed to PalmDesktop4.1.1

Q:\P8B\PS\PS\Programs-Palm 3\PalmDesktop4.1 renamed to PalmDesktop4.1.1

Q:\P8B\PS\PS\X-61-C 250GB\SWTOOLS\DRIVERS\turbomem\DRV\PinningUI\ITM.gadget renamed to ITM.gadget.gadget

A problem with periods in a folder name. Repeats the last substring.

To test the program, I made a copy of a folder using TeraCopy and then compare the Ant Renamer changed folder with the copy and was surprised to find this unexpected change using BeyondCompare. Disappointed because I initially found it to be working well.

(Cleaning up my old backups from multiple computers over the years.)
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: String replacement in folder names with a dot causes duplications in the folder name

Post by antp »

Version 2.12 is from 2015, my post above was from 2019, so not yet fixed indeed, sorry ;)
Normally if you enable the "include extension" option it works correctly.
I'll put it at the top of my "Ant Renamer" to-do list but I don't know when I'll take time for it.
Post Reply