My RegExp no longer works in 0140

Things you’d like to miss in the future...
John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Canada

My RegExp no longer works in 0140

Post by John Bee »

Hi;

I need help with the new way you are doing the RegExp Rename.

Up until 0140 I was doing it this way:

using

.*(.msi|.exe|.zip|.rar|.pdf|.7z)>XYplorer 5.00.0140 beta.zip

would change

Xyplorer_5.00_beta.zip.dsc.txt
Xyplorer_5.00_beta.zip

to

XYplorer 5.00.0140 beta.zip.dsc.txt
XYplorer 5.00.0140 beta.zip


but now in 0140 I get:

XYplorer 5.00.0140 beta.zip.dsc.txt
Xyplorer_5.00_beta.zip

Only the .txt file seems to match.


This is possibly to do with?:

* Rename Special: from now on, the following commands will *never*
change the extensions of the renamed files.
- Batch Rename...
- RegExp Rename...
- Search and Replace...
- Keep Particular Characters...


So how do I change my RegExp to compensate?

John

Win2K
0139
1,406ms/453ms

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: My RegExp no longer works in 0140

Post by admin »

Yeah, you feel the recent changes here: extensions simply don't take part anymore in the functions I mentioned. Simply because it is highly unlikely that one would change base and extension of one or more names at the same time. It is rare enough to extensions at all...

If I get your RegExp right, you want to replace "Xyplorer_5.00_beta" with "XYplorer 5.00.0140 beta". Why not simply do "Search and Replace"?
Pattern: Xyplorer_5.00_beta/XYplorer 5.00.0140 beta

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Canada

Re: My RegExp no longer works in 0140

Post by John Bee »

admin wrote:Yeah, you feel the recent changes here: extensions simply don't take part anymore in the functions I mentioned. Simply because it is highly unlikely that one would change base and extension of one or more names at the same time. It is rare enough to extensions at all...

If I get your RegExp right, you want to replace "Xyplorer_5.00_beta" with "XYplorer 5.00.0140 beta". Why not simply do "Search and Replace"?
Pattern: Xyplorer_5.00_beta/XYplorer 5.00.0140 beta
Hi Don;

Well, because that regexp handles all renames no matter what the actual original filename. I only have to type in the replacement and not the original filename.

John

Win2K
0139

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Canada

Re: My RegExp no longer works in 0140

Post by John Bee »

admin wrote:Yeah, you feel the recent changes here: extensions simply don't take part anymore in the functions I mentioned. Simply because it is highly unlikely that one would change base and extension of one or more names at the same time. It is rare enough to extensions at all...

If I get your RegExp right, you want to replace "Xyplorer_5.00_beta" with "XYplorer 5.00.0140 beta". Why not simply do "Search and Replace"?
Pattern: Xyplorer_5.00_beta/XYplorer 5.00.0140 beta
Hi Don;

Well, because that regexp handles all renames no matter what the actual original filename and its a quick copy and paste for the replacement and I don't have to type in the original filename.

John

Win2K
0139

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: My RegExp no longer works in 0140

Post by admin »

John Bee wrote: Well, because that regexp handles all renames no matter what the actual original filename and its a quick copy and paste for the replacement and I don't have to type in the original filename.
Ah, I see. Then you have to alter your RegExp to handle the new rules. I'm sure it's easy when you know how to do it. :wink:

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Canada

Re: My RegExp no longer works in 0140

Post by John Bee »

admin wrote:
John Bee wrote: Well, because that regexp handles all renames no matter what the actual original filename and its a quick copy and paste for the replacement and I don't have to type in the original filename.
Ah, I see. Then you have to alter your RegExp to handle the new rules. I'm sure it's easy when you know how to do it. :wink:
Hi Don

Ha, ha, without the ext in the picture you've made it virtually impossible to use regexp renames with multiple filenames that are not the same.

I need the ext to use regexp properly.

John

Win2K
0139

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Yeah, not a regexp expert but I'm pretty sure it can't be done anymore, as the extension was used inside the regexp to determine what part of the filename will be renamed (thus leaving the ext out just makes this impossible now)

I also would love to have RegExp rename working back with the full filename, aka base+ext. Because like here in John's case it could have been part of the regexp, and could also allow to have regexp working on the extension!

I really think it's be better, as now you're limitating the power of use of regexp more than making things easier, I think....

BTW, I actually feel the same about Batch Rename too. Plus it was cool to have it either to reset the extension, or keep the original extensions, or remove them even! Now all that is gone :( We can only have them ujntouched, so again, I feel like we're loosing here :roll:
(and even with the extension, the new template "2006-*-(backup)" would still work, just say * is base only, or better more!, like ? for base only, * for for both, : for ext only)

..oh I understand system had "flaws", because a dot can be part of the filename and not an extension (eg filename "first part.second part.ext") so for such files it was impossible to leave the extension untouched, since ".second part" would be considered as the extension, so we had to reset the extension... but with your new template addition this (leaving extension untouched) could now be possible using whatever if used for extension only ;)
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: My RegExp no longer works in 0140

Post by admin »

John Bee wrote:Ha, ha, without the ext in the picture you've made it virtually impossible to use regexp renames with multiple filenames that are not the same.
Hm. Which files do you what to rename to what?

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

jacky wrote:I really think it's be better, as now you're limitating the power of use of regexp more than making things easier, I think....
Ok, I'm no regexp man, and when enough users (two :wink: ) tell me, they'd rather have the extension in the picture here, no problem. I won't use it anyway myself :wink:
jacky wrote:BTW, I actually feel the same about Batch Rename too. Plus it was cool to have it either to reset the extension, or keep the original extensions, or remove them even! Now all that is gone :( ...
Hm, to reset the extension simply use "Set Extension".
My goal was to make things (a) easier, and (b) safer (changing the extension can mean losing important information when you're not a file format guru).

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Post by RalphM »

admin wrote:Ok, I'm no regexp man, and when enough users (two :wink: ) tell me, they'd rather have the extension in the picture here, no problem. I won't use it anyway myself :wink:
I didn't check it out myself yet, but if it's true, that by this addition the ext isn't even availabe for the regexp to evaluate the need for certain actions on certain ext's only, then I'm definitely voting to get it back the way it was.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:Hm, to reset the extension simply use "Set Extension".
My goal was to make things (a) easier, and (b) safer (changing the extension can mean losing important information when you're not a file format guru).
[Set Extension] Yeah I know, just it's one more step than it used to be ;) And renaming extension on batch rename can be usefull, for example when working on pictures, to make sure they're all ".jpg" not ".jpeg" or ".JPG"/".Jpg" etc which isn't only a visual thing (even if it counts, for some ;)) but also quite important when you intend to send & use thoose files on a *nix environement (eg web server).

And I understand your motivation, just that i though the way it was was more powerfull and yet quite easy, you know the good old XY way to go ;) I can see how having the ext left out can be seen as easier/safer; but regarding the safer side.. well XY targets power user, ie they're supposed to know what they're doing, I mean don't click on Nuke just for fun guys! :P ;)
As for easier, if adding something like .: (in the idea that : means original extension) get the same results, doesn't sound too complicated to me, and allows one to batch rename with or without changing the extension... but hey, it's your call uh? ;)

BTW:

Code: Select all

    + Rename Special/Batch Rename: added shortcut Shift+F2. Useful to 
      invoke the Batch Rename interface if only one (or no) list item is 
      selected
so I got a question: what the hell is XY gonna do when I do a Batch Rename while no items are selected at all?? What's gonna be renamed?? I don't get it :oops:
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

jacky wrote: what the hell is XY gonna do when I do a Batch Rename while no items are selected at all?? What's gonna be renamed?? I don't get it :oops:
Last time I checked it would rename the focused item. :wink:

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:
jacky wrote: what the hell is XY gonna do when I do a Batch Rename while no items are selected at all?? What's gonna be renamed?? I don't get it :oops:
Last time I checked it would rename the focused item. :wink:
hmmm.. well, tried again with .143 and nothing happens :?
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

jacky wrote:
admin wrote:
jacky wrote: what the hell is XY gonna do when I do a Batch Rename while no items are selected at all?? What's gonna be renamed?? I don't get it :oops:
Last time I checked it would rename the focused item. :wink:
hmmm.. well, tried again with .143 and nothing happens :?
List focused? (I cannot check where I am right now)
PS: use Shift+F2!

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:List focused? (I cannot check where I am right now)
PS: use Shift+F2!
Yes, Shift+F2 (how else could I trigger Batch Rename without any selected items anyway?) and List focused. F2 selected the focused item and switch in Rename mode, but Shitf+F2 shows the BR window, then nothing.
Proud XYplorer Fanatic

Post Reply