multi-rename/copy problem with regular expression of *

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Dwarden
Junior Member
Junior Member
Posts: 2
Joined: 2003-08-05, 02:24 UTC
Location: Czech Republic

multi-rename/copy problem with regular expression of *

Post by *Dwarden »

in past it was possible to use rename / copy on multiple files
where the previous value of * was saved properly for the resulting name

let say for example you have directory with two files
001.jpg
002.jpg

select all files via *.*
choose copy or rename F5/F6 or SHIFT+F5 / SHIFT+F6
use as resulting name
1_*.1_*

this in past resulted into
1_001.1_jpg
1_002.1_jpg

but now the result is
1_1.1_g
1_2.1_g

seems like now the values are rewritten (similar to ? being used)
instead copied old * value as whole

is there way how get 'old' behaviour back ?
or what's the proper regular express argument to keep original value for the desired result?

i'm just confused because it was working in past and now isn't' ...

thanks for any help
User avatar
wanderer
Power Member
Power Member
Posts: 1579
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Behavior confirmed under XP SP3. Seems like a bug.

Although... TC 7.50a has the same behavior...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Oops O_o Windows command line processor also have this bug? :D I think such behaviour has place for many years and used everywhere. If you try to rename files using ren command line command, you'll get same result. So I don't think it is a bug - just specific behaviour (I agree that sometimes it is not so useful).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This isn't a bug, TC just tries to behave like the Windows command line processor...
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author) wrote:This isn't a bug, TC just tries to behave like the Windows command line processor...
If TC really had described above behaviour, maybe it may have some option to use its behaviour or CMD's one?
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Maybe it was back in 6.x? I seem to recall something like that, but checking in 7.03 has the same behaviour. And changing my cmd interpreter (cmd.exe) back to Win2K's didn't have any effect either.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Dwarden
Junior Member
Junior Member
Posts: 2
Joined: 2003-08-05, 02:24 UTC
Location: Czech Republic

Post by *Dwarden »

then tell me how i done it these years ? :)

or i'm just crazy ....
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, it has always worked this way in TC. Characters you type in the rename field replace the characters of the original name. The * character just pastes the remaining characters of the name/extension, depending on where it stands.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2Dwarden
use as resulting name
1_*.1_*
[...]
or what's the proper regular express argument to keep original value for the desired result?
I use MRT for this (Ctrl+M):
Name: 1_[N]
Extension: 1_[E]
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

BTW command line processor and TC rename files using *~.* mask differently. CMD appends ~ to extension while TC lefts name unchanged. Is it intentional?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe the command line processor was changed since I implemented this? Older versions ignored characters after the * char. For the moment, I don't have plans to change this.
Author of Total Commander
https://www.ghisler.com
Post Reply