Renaming files: numbers

Features wanted...
Post Reply
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Renaming files: numbers

Post by jacky »

Hey,

So, just to create a seperate thread about this, I would like a way to use "numbers" while renaming files.
So if we have a group of files, we select them and choose to rename them "Picture $NB2$.jpg" they'll be renamed into "Picture 01.jpg", "Picture 02.jpg", "Picture 03.jpg", etc
Numbers would follow the order the files are in the list (so can have use dates, sizes, etc to order them). (maybe need something to choose which number to start from)

Right now we can do a lot of stuff with the S&R and the regexp, but I don't think than can be done, and it's would be really cool to have this :D

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

Re: Renaming files: numbers

Post by admin »

Looks good. Where did you get that "Picture $NB2$.jpg" format? What's NB? "Number"?

As far as I see, what we need to define is a number format and a starting number. Somebody must have done this before. Isn't there maybe even a de facto standard for this? I mean, there are zillions of renaming tools out there...

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Post by Creat »

maybe additionally tu numbr format and starting number a step size so it's possible to make it like
start=1, step=2: 01, 03, 05, ...
start=5, step=5: 05, 10, 15, ...

or the number of digits (in jacky's example I assume that's what the 2 is for) to tell him to fill the number to that many digits
2 digits: 1 -> 01, 10 and 100 and so on stay untouched
4 digits: 1 -> 0001, 10 -> 0010, 10000 and longer stay untouched

since it's being implemented from scratch (as I understood) might as well give it lots of options :D

bye
Creat

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

Post by admin »

number of digits: that's what I meant with number format
step size: well, is there any practical use...?

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

Post by jacky »

Gotta say I don't know about other soft. But looks to me that a lot of thoose renaming tools are gonna use some kind of GUI to set up the renaming rules, so you'll probably to have to create something of your own.

Would it be a new renaming option, or used within existing ones (regexp) Would probably make things a bit more complicated, but could allow to make stuff like +10 or *2 Not saying I have any use for this though.... :P

If it's a new one I think the best could be to use <tag> instead of $tag or likes, might look better/easier to get it, plus neither < or > are allowed in filenames. Every <> would be replaced by a number, options within ; like "My Picture <start=38;length=3;step=-2>.jpg" would do "My Picture 038.jpg", "My Picture 036.jpg", "My Picture 034.jpg"...

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Post by Creat »

that's actually a good suggestion, since < and > are not allowed in filenames.

might wanna make it something even more html-tag like in case you want to add other 'fields' later
<number start=x length=y step=z>

I can't think of a good use of the step field either right now, but I do think that there might be applications for it. And implementing it (esp. in VB where loops have a step argument anyway) shouldn't make the whole thing considerably more difficult, so why not?

might allow other 'tags' like <date format="dd.mm.yy" source="today">
other sources could be "filedate", "folderdate", "1 week ago" or similar (or just a plain date, but then there wouldn't be a need for a field)

just suggesting though, I don't need those functions myself (or barely)

might also be more consistent to extend the regular expression syntax to allow that, but that would probably be hard to implement since I assume you don't parse those yourself but just hand them off to some evaluation function that handles them. Allowing to combine them might still be nice...

bye
Creat

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

Post by admin »

Creat wrote:<number start=x length=y step=z>
It starts looking good...
Creat wrote:might also be more consistent to extend the regular expression syntax to allow that, but that would probably be hard to implement since I assume you don't parse those yourself but just hand them off to some evaluation function that handles them.
Exactly. No hopes here.

legion1978
Posts: 37
Joined: 19 Oct 2005 18:37
Location: south am
Contact:

Post by legion1978 »

well i actually have to use some tool to mass renaming..(file menu tools) {since i still cant figure out tthe regexp thing} you can set the new name, add a counter and have the option to append it to the old name or replace it all.. its accessed through the context menu(cause its a explorer menu extension) so it pops up a small window where u set up the process..
(optionally u can search ,replace and add strings to existing names)

xplorer2 has a template ($something) to different renaming options plus an output preview.

yeah renamig tools are out there a lot, but itd be grat to just select a couple (a lot) of files(pics) and hit f2.. and there u go.
Ukeireru nara shini wa shinai

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

Post by admin »

legion1978 wrote:yeah renamig tools are out there a lot, but itd be grat to just select a couple (a lot) of files(pics) and hit f2.. and there u go.
Yes. I plan to add another tab to the info panel called "Rename". But there are some other things to do first.

Post Reply