Batch Rename auto-number sufix

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Batch Rename auto-number sufix

Post by jacky »

Code: Select all

    + Batch Rename: added a quick and easy way. If you simply give a 
      string with no increment or datestamp arguments, then the Number 
      Suffix for filenames (as stated in Configuration|Report) is 
      automatically taken as increment template
This is a nice little addition, but I see it has a bug also. I have a bunch of files I wanna rename so they all have the same base name, only the extension differs, eg: toto.txt, toto.doc, toto.jpg, etc

I usually just select them, hit F2 & voilà! But now I get "toto - 01.txt", "toto - 02.doc", "toto - 03.jpg", etc :?
Can still do what i want using regexp, but still... maybe if there was a check, and only use the number suffix if extensions are the same??

And while I'm here, could you add "Rename Special" and also "Info to Clipboard" to the List ctxt menu (on blank area) ?? Cause unlike Explorer and many others triggering this ctxt menu in XY does not affect (as in loose) any selection, which is great, especially since it shows up instantly while the other one might require time for other soft (like WinRAR, etc) to add/init their items.
I love using it to Cut/Copy files already, way faster than actually right-clicking on a file of the selection, and well if Info & Rename could be available that way too it would be great, me thinks! 8)
Proud XYplorer Fanatic

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

Re: Batch Rename auto-number sufix

Post by admin »

jacky wrote:I usually just select them, hit F2 & voilà! But now I get "toto - 01.txt", "toto - 02.doc", "toto - 03.jpg", etc :?
Can still do what i want using regexp, but still... maybe if there was a check, and only use the number suffix if extensions are the same??
Hmm, test would be difficult since there can be so many possible variations. Other idea: Since that task seems me a rather rare one, how about some way to make the given pattern "exact", i.e. to avoid any smart additions. For example "toto<#>" meaning: do not add any increment, or simply "toto<>" : do not add anything. Hmm...
jacky wrote:And while I'm here, could you add "Rename Special" and also "Info to Clipboard" to the List ctxt menu (on blank area) ?? Cause unlike Explorer and many others triggering this ctxt menu in XY does not affect (as in loose) any selection, which is great, especially since it shows up instantly while the other one might require time for other soft (like WinRAR, etc) to add/init their items.
I love using it to Cut/Copy files already, way faster than actually right-clicking on a file of the selection, and well if Info & Rename could be available that way too it would be great, me thinks! 8)
The story here goes like this: AFAIK this ctx menu is one of the ctx menus that pop up on the wrong place on dual monitor systems. So I will rewrite it to work through the API popup mechanism. When I do this it will be very easy to fulfill your (cool) wish. However, one little thing has to be solved before: the "New Items" submenu features icons in the menu, and I still have to find a smooth way to have and manage these icons when I call thru API... that needs some research still. But all this can only be done after (1) new license key (2) CKS, and probably even (3) Dual Pane. That's how computers work: one thing after the other... :wink:

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Post by lukescammell »

I'm glad you brought this up jacky, as I have the same problem. I often (every day) have to rename a bunch of files to the same name, only with different extensions - it's a great way of grouping project files together.

I would expect it to NOT add the numbers unless I put the <#> in it.
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

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

Re: Batch Rename auto-number sufix

Post by jacky »

admin wrote:Other idea: Since that task seems me a rather rare one, how about some way to make the given pattern "exact", i.e. to avoid any smart additions. For example "toto<#>" meaning: do not add any increment, or simply "toto<>" : do not add anything. Hmm...
Well, yeah I think that'd work for me. I actually even tried it before I came here, but IIRC right now <> does nothing and <#> does the same as <#1>

Allthough, I think the best way would be to not use <> but rather to enquote the pattern, or just use a quote as prefix, that way it'll keep consistency with the exact match already used elsewhere on XY. ;)
admin wrote:But all this can only be done after (1) new license key (2) CKS, and probably even (3) Dual Pane. That's how computers work: one thing after the other... :wink:
nah computers can now do mutithreading! :P :wink:
Ok, I'll wait. As long as I know its coming I can wait. Now I just find myself in this weird place where I say "I can't wait for XY to get Dual Pane!" ; but just for all that's planned after it's been added, that I really can't wait for! :D ;)

@lukescammell: If you have to do such rename very often, just in case here's a regexp that can help:

Code: Select all

.*(\..*)>whatever the name is$1
Just don't forget the $1 at the end, that's to put back the extension ;)
Proud XYplorer Fanatic

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

Post by admin »

lukescammell wrote:I would expect it to NOT add the numbers unless I put the <#> in it.
That's how it worked before I added the smart auto-increment. I always disliked smartness in computers and now you know why. :mrgreen:

I do not like either of these very much:
"thename" resp. "thename
thename<>

Maybe jacky's idea of checking and putting the smart increment only if necessary is the best.

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Post by lukescammell »

Jacky, thanks for the regex, I'm sure that will come in damn useful!
/me wonders about the possibility of batch-rename catalogue items (or can this be done already?)

Don, I agree that only using smart increment if necessary is the best way to do things. Also, I can't wait to have undo on batch rename ;) Add that to the list please :D
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

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

Post by admin »

lukescammell wrote:Also, I can't wait to have undo on batch rename ;) Add that to the list please :D
Oh, that's easy. I'll simply do a full file system snapshot before each batch rename, and I'm ready to roll back. har har.

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

Re: Batch Rename auto-number sufix

Post by admin »

jacky wrote:I usually just select them, hit F2 & voilà! But now I get "toto - 01.txt", "toto - 02.doc", "toto - 03.jpg", etc :?
Can still do what i want using regexp, but still... maybe if there was a check, and only use the number suffix if extensions are the same??
Done. 8)

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

Re: Batch Rename auto-number sufix

Post by jacky »

admin wrote:Done. 8)
Yep, very well done! :D You're the best!

Allthoug just to be a pain :oops: I could suggest a little thing, which is what I thought would happen when I read about your "cute little algorithm that checks for existing files and files *going* to exist after the rename" :
hey.mp3 -> ciao-01.mp3
hi.wav -> ciao-01.wav
ho.wav -> ciao-02.wav
hola.mp3 -> ciao-02.mp3
hum.wav -> ciao-03.wav

So when you rename hey.mp3 because there will be other *.mp3 files it gets a suffix number. Not a big deal for me, but it makes sense to work that way I think, plus I thought checking for files that exists and are going to exists meant that :roll:
Proud XYplorer Fanatic

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

Re: Batch Rename auto-number sufix

Post by admin »

jacky wrote:Allthoug just to be a pain...
As usual :wink:

See what you mean, but as it is now it is formally consistent with Ctrl+D. Okay, this is duplicates... slightly other topic. I personally never had the idea to give files of different extensions the same name, so I don't know what would be expected here... I only know this: the way it works now is done and working -- any other way I still would have to do. :wink:

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Post by lukescammell »

admin wrote:
lukescammell wrote:Also, I can't wait to have undo on batch rename ;) Add that to the list please :D
Oh, that's easy. I'll simply do a full file system snapshot before each batch rename, and I'm ready to roll back. har har.
BRU manages it, why can't XY? :P
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

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

Re: Batch Rename auto-number sufix

Post by jacky »

admin wrote:
jacky wrote:And while I'm here, could you add "Rename Special" and also "Info to Clipboard" to the List ctxt menu (on blank area) ?? Cause unlike Explorer and many others triggering this ctxt menu in XY does not affect (as in loose) any selection, which is great, especially since it shows up instantly while the other one might require time for other soft (like WinRAR, etc) to add/init their items.
I love using it to Cut/Copy files already, way faster than actually right-clicking on a file of the selection, and well if Info & Rename could be available that way too it would be great, me thinks! 8)
The story here goes like this: AFAIK this ctx menu is one of the ctx menus that pop up on the wrong place on dual monitor systems. So I will rewrite it to work through the API popup mechanism. When I do this it will be very easy to fulfill your (cool) wish. However, one little thing has to be solved before: the "New Items" submenu features icons in the menu, and I still have to find a smooth way to have and manage these icons when I call thru API... that needs some research still. But all this can only be done after (1) new license key (2) CKS, and probably even (3) Dual Pane. That's how computers work: one thing after the other... :wink:
Allright, so new license key is done, CKS is coming, and despite all that you already changed the menu, since it pops up on the right monitor now! :)
So screw this "Dual Pane" thing (whatever that is :P) and do this right after the CKS please, it would really be cool, methinks. Having Info to Clipboard/Rename Special, and on Finding Tab all the "Go to Focused Item..." menus too would really save some us time.
As I said, it's great that, unlike stupid other file managers, XY do not loose any selection when poping up this menu, so let's made full use of it! I had to use the Rename a lot lately, and used the menu File to go there (cause that item ctxt menu is (usually) slow as hell) but.. well you got the point ;)

BTW, you know what could be pretty cool too when it comes to customizing, now that we have toolbar & wil have CKS: let the user customize what menuitems to put into this List ctxt menu!!
Yeah, cause some of use could get ride of menus we never use and if not confuses us at times at least "waste" space, plus we could add some you would never add there cause it doesn't make sense/use for you... for instance, I know someone who would put the "Suspend Auto-Refresh" in here....

[/PITA] :mrgreen:
Proud XYplorer Fanatic

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

Re: Batch Rename auto-number sufix

Post by admin »

jacky wrote:Allright, so new license key is done, CKS is coming...
Well, :mrgreen: , so why don't you ask for this after CKS is done? :P

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

Re: Batch Rename auto-number sufix

Post by jacky »

admin wrote:
jacky wrote:Allright, so new license key is done, CKS is coming...
Well, :mrgreen: , so why don't you ask for this after CKS is done? :P
Well, because I wanted to make sure I don't forget. So now that I've posted here it's not me but you who has not to forget :mrgreen:
Plus, it could inspire someone else who'd have another idea related to this,
Plus, posting on forums can hep tracking things down,
Plus, you started it by fixing the popup location for the menu & deal with their icons before planned
Plus, gimme another minutes or two and i probably can come up with a few more (bogus) reasons :P ;)

Don't worry though, I'll remind you after CKS if you forget ;)
Proud XYplorer Fanatic

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

Re: Batch Rename auto-number sufix

Post by admin »

jacky wrote:
admin wrote:
jacky wrote:Allright, so new license key is done, CKS is coming...
Well, :mrgreen: , so why don't you ask for this after CKS is done? :P
Well, because I wanted to make sure I don't forget. So now that I've posted here it's not me but you who has not to forget :mrgreen:
Plus, it could inspire someone else who'd have another idea related to this,
Plus, posting on forums can hep tracking things down,
Plus, you started it by fixing the popup location for the menu & deal with their icons before planned
Plus, gimme another minutes or two and i probably can come up with a few more (bogus) reasons :P ;)

Don't worry though, I'll remind you after CKS if you forget ;)
:lol:

Post Reply