Page 1 of 1

Renaming files: numbers

Posted: 03 Oct 2005 17:37
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

Re: Renaming files: numbers

Posted: 04 Oct 2005 19:08
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...

Posted: 04 Oct 2005 20:28
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

Posted: 04 Oct 2005 20:46
by admin
number of digits: that's what I meant with number format
step size: well, is there any practical use...?

Posted: 04 Oct 2005 22:52
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"...

Posted: 05 Oct 2005 00:58
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

Posted: 05 Oct 2005 10:04
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.

Posted: 05 Nov 2005 21:33
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.

Posted: 07 Nov 2005 12:42
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.