Page 1 of 1

Batch rename

Posted: 29 Apr 2011 23:10
by myrnalarson
When using Batch Rename, the increment can be a number or a date. Is it possible to use a letter, e.g. test-a, test-b, test-c, etc?

Re: Batch rename

Posted: 30 Apr 2011 02:46
by j_c_hallgren
Since you're new here, you may not realize that we don't need threads to always be in the 'proper' sub-forum so I'd suggest you delete the similar "wish" thread and just revise your request here...Don will still see it and it keeps the forum cleaner...thanks!

Re: Batch rename

Posted: 30 Apr 2011 03:08
by myrnalarson
The problem is that I thought I had posted under this topic, but I couldn't find it. I asked for all messages posted by me and it didn't show up.

So I posted it again, this time in the Wish List. I'll delete that one.

Thanks for the tip!

Re: Batch rename

Posted: 30 Apr 2011 03:50
by j_c_hallgren
There's a lot to know about XY and lucklily we have a wide variety of forum regulars here who each have their area of expertise...I've tended to try and help the first-time or new users since I'm not a user of some features of XY since my needs are limited (no scripting or networks)...all we ask is that you try and search prior threads to avoid duplicates...sometimes the keywords to search for can be hard to determine for new users so I can help with that on occasion.

Re: Batch rename

Posted: 30 Apr 2011 18:39
by admin
myrnalarson wrote:When using Batch Rename, the increment can be a number or a date. Is it possible to use a letter, e.g. test-a, test-b, test-c, etc?
Yes. Open Tools | Configuration | Templates | Incremental Suffix and enter "-a" as suffix.

Re: Batch rename

Posted: 30 Apr 2011 19:42
by myrnalarson
I'm still having problems with this.

Let's say I have this series of files: 00 01.jpg, 00 02.jpg, 00 03.jpg

The incremental suffix is a space followed by the letter a.

In the batch rename box I type 00. The preview shows 00.jpg, 00 b.jpg, and 00 c.jpg. The first file doesn't get the letter a, as I want.

Or, let's say I have these files: 00 a.jpg, 00 b.jpg, 00 c.jpg. I want to change the letter suffix to a 2-digit number, beginning with 1. (i.e. a = 01, b = 02, c = 03, etc)

In Configuration, I set the suffice to a space followed by 01, (meaning I want to assign 01 to the 1st file, 02 to the 2nd, etc). Then I try to rename the files. I type just 00 in the rename dialog. The result is files named 00.jpg, 00 11.jpg and 00 21.jpg.

So it seems to interpret the 0 as the trigger for sequential numbers, and the 2nd digit (1), is not incremented but tacked on the end.

Perhaps I'll have to write a script for this. I've been programming in DOS and Visual Basic for 40 years now, so I think I'll be able to tackle it.

Re: Batch rename

Posted: 30 Apr 2011 19:58
by admin
myrnalarson wrote:I'm still having problems with this.

Let's say I have this series of files: 00 01.jpg, 00 02.jpg, 00 03.jpg

The incremental suffix is a space followed by the letter a.

In the batch rename box I type 00. The preview shows 00.jpg, 00 b.jpg, and 00 c.jpg. The first file doesn't get the letter a, as I want.

Or, let's say I have these files: 00 a.jpg, 00 b.jpg, 00 c.jpg. I want to change the letter suffix to a 2-digit number, beginning with 1. (i.e. a = 01, b = 02, c = 03, etc)

In Configuration, I set the suffice to a space followed by 01, (meaning I want to assign 01 to the 1st file, 02 to the 2nd, etc). Then I try to rename the files. I type just 00 in the rename dialog. The result is files named 00.jpg, 00 11.jpg and 00 21.jpg.

So it seems to interpret the 0 as the trigger for sequential numbers, and the 2nd digit (1), is not incremented but tacked on the end.

Perhaps I'll have to write a script for this. I've been programming in DOS and Visual Basic for 40 years now, so I think I'll be able to tackle it.
It works as advertised: inn the definition "0" stands for a numerical increment starting with "1", "a" stands for an alphabetical increment starting with "b".

Re: Batch rename

Posted: 30 Apr 2011 20:17
by myrnalarson
You show as one of the examples _00, i.e. with 2 zeroes. I (obviously incorrectly) assumed that if I specified 01, it would mean "start with 1 instead of 0" (i.e. similar to the <#01> syntax).

It looks to me as though I can only get what I want with numbers if I use the <#01> syntax, and there's no way to specify (with similar syntax) that I want the 1st file to have the letter a added, the 2nd the letter b, etc.

Is that correct?

Re: Batch rename

Posted: 30 Apr 2011 20:19
by admin
Correct.

Re: Batch rename

Posted: 01 May 2011 09:03
by admin
myrnalarson wrote:You show as one of the examples _00, i.e. with 2 zeroes. I (obviously incorrectly) assumed that if I specified 01, it would mean "start with 1 instead of 0" (i.e. similar to the <#01> syntax).
Well, I thought about it and it makes sense. I could quite easily change it to work as you wish. Then increment template and <#01> syntax would work identical. The latter will then also support letters <#aa>.

There's a little problem with upgrading: To keep the current behavior as it is for upgraders I could attempt to autoconvert "-00" to "-01", "_000" to "_001", "-aa" to "-ab" etc. but it will be hard to cover all possible patterns. But I think only a very small minority of users will have other patterns here anyway.

Re: Batch rename

Posted: 01 May 2011 18:07
by myrnalarson
i (obviously) would be in favor of the change, but don't go to all that work just for one user.

Re: Batch rename

Posted: 01 May 2011 20:45
by admin
myrnalarson wrote:i (obviously) would be in favor of the change, but don't go to all that work just for one user.
I like it too, that makes two of us. :)

Re: Batch rename

Posted: 01 May 2011 22:28
by myrnalarson
With 2 votes in favor, there's only one that matters, and that's yours :D

Re: Batch rename

Posted: 02 May 2011 00:42
by PeterH
I think Don is fair, he doesn't count his own vote. 8)
But if he likes yours, he counts it twice. :shock:
(At least...) :wink:

But don't get me wrong: thats OK :D