Page 1 of 1
batch rename; shift range of numbered filenames
Posted: 12 Sep 2006 06:31
by guster
This was posted in the “Wishes” forum by mistake. Please forgive the error and this cross-posting
I have files t1.asc through t16.asc in a bunch of directories. For some directories I need to ratchet t#-end forward or backward. There are other trials in the series, and in the rest of the directory (some other series' and individual files) which should remain unaltered.
In one directory, I renamed t3 to tp3 manually. Then, in batch rename, I tried:
t<#4-#17>.asc = t3.asc
with t4.asc through t17.asc highlighted. The output form: t00004.asc = t3.asc
Will you please show me the syntax to get t3.asc --- t16.asc. Thank you.
Re: batch rename; shift range of numbered filenames
Posted: 12 Sep 2006 09:50
by admin
guster wrote:This was posted in the “Wishes” forum by mistake. Please forgive the error and this cross-posting
I have files t1.asc through t16.asc in a bunch of directories. For some directories I need to ratchet t#-end forward or backward. There are other trials in the series, and in the rest of the directory (some other series' and individual files) which should remain unaltered.
In one directory, I renamed t3 to tp3 manually. Then, in batch rename, I tried:
t<#4-#17>.asc = t3.asc
with t4.asc through t17.asc highlighted. The output form: t00004.asc = t3.asc
Will you please show me the syntax to get t3.asc --- t16.asc. Thank you.
Whoops, there you misread the help file or wiki (I just improved that part). "t<#4-#17>.asc = t3.asc" is not a valid pattern. Instead do it like this:
1. Select the files to be renamed
2. Enter this template: t<#3>.asc
3. Click OK. Now the 1st file will be renamed to "t3.asc", the next to "t4.asc" etc. The files are renamed in the order in which they are currently listed.
4. BTW: if your files are already *.asc, then you can leave the extension out of the template and simply use: t<#3>
Posted: 13 Sep 2006 05:47
by guster
"...
1. Select the files to be renamed
2. Enter this template: t<#3>.asc
3. Click OK. Now the 1st file will be renamed to "t3.asc", the next to "t4.asc" etc. The files are renamed in the order in which they are currently listed.
4. BTW: if your files are already *.asc, then you can leave the extension out of the template and simply use: t<#3>
..."
Thank you very much; that is a great start for me.
But, t<#3> stripped the extension. On a second pass, I used t<#3>.asc to get it tacked back on.
I was going to ask how to instruct a range within a longer sequence of files, but it seems evident that it only operates on the selected files. I already had a partial range, with files not included at the beginning. Also, it is evident that sorting in various orders in advance determines the order of operation (you said this in your own way).
Can a long list be defined in the pattern, rendering selection unnecessary? And, can the operation order be made implicit by the prior filenames (t3, t4, t5, t6 ...)?
I assume the complexity of different tasks can vary a lot and that regexp becomes neccessary for the harder tasks. Are there some general factors to consider that can determine when regexp is the better tool, or is it always a matter of trial and error?
Posted: 13 Sep 2006 06:11
by jacky
guster wrote:But, t<#3> stripped the extension.
I'd sat that's odd. Or maybe you don't have the latest version, at one point that behavior might have been different :unsure:
Just tried it quickly to make sure, t<#1> kept the extensions untouched for me...
guster wrote:Can a long list be defined in the pattern, rendering selection unnecessary?
Not really, but with Ctrl+M you can define a Selection Filter, eg. file##.* to select all corresponding files. Then just use Batch Rename (F2) as usual
guster wrote:And, can the operation order be made implicit by the prior filenames (t3, t4, t5, t6 ...)?
Not sure I understand you there. You mean the original filenames? If so, just sort your list by Names

Posted: 13 Sep 2006 07:35
by admin
guster wrote:Can a long list be defined in the pattern, rendering selection unnecessary? And, can the operation order be made implicit by the prior filenames (t3, t4, t5, t6 ...)?
I'm not sure what you mean by this, but I plan to add something that might help here:
"rename by list". You will get a simple multi-line edit field where you can type or paste any number of filenames (one per row). They will then be mapped onto the selected items. This will allow you to do extremely irregular batch renames that no template and no RegExp could do. Like a "multiple hard rename".
Posted: 13 Sep 2006 07:52
by guster
I just found that I needed to update v 4.5 to v 5.1.
Do I uninstall first or install on top of the old to update?
selection filter
Posted: 13 Sep 2006 08:06
by guster
admin wrote:guster wrote:Can a long list be defined in the pattern, rendering selection unnecessary? And, can the operation order be made implicit by the prior filenames (t3, t4, t5, t6 ...)?
I'm not sure what you mean by this, but I plan to add something that might help here:
"rename by list". You will get a simple multi-line edit field where you can type or paste any number of filenames (one per row). They will then be mapped onto the selected items. This will allow you to do extremely irregular batch renames that no template and no RegExp could do. Like a "multiple hard rename".
The selection filter (previous post) will be an important tool for this. I was thinking of a way around selecting multiple files individually from large directories. And, your multiple entry bars should take care of anything else. [The power still grows!] Thank you.
Posted: 13 Sep 2006 09:03
by j_c_hallgren
guster wrote:I just found that I needed to update v 4.5 to v 5.1.
Do I uninstall first or install on top of the old to update?
I always just install over the prior vers...just make sure XY isn't running at the time!

On very rare occasions, there can be some options/values that change function or settings so always check the change log to see what's involved in updates.
Posted: 13 Sep 2006 17:10
by jacky
admin wrote:I'm not sure what you mean by this, but I plan to add something that might help here: "rename by list". You will get a simple multi-line edit field where you can type or paste any number of filenames (one per row). They will then be mapped onto the selected items. This will allow you to do extremely irregular batch renames that no template and no RegExp could do. Like a "multiple hard rename".
Not really related, but you know what would be nice too? When "Drop Stack" will be there, if one could reorder files inside the DS as he wants (I mean drag&drop them within the List to order them as whishes), so when we trigger the Batch Rename we could have choosen the order in which files will be renamed, can be pretty usefull, especially when used with the counter/increment!

Posted: 13 Sep 2006 19:01
by admin
jacky wrote:admin wrote:I'm not sure what you mean by this, but I plan to add something that might help here: "rename by list". You will get a simple multi-line edit field where you can type or paste any number of filenames (one per row). They will then be mapped onto the selected items. This will allow you to do extremely irregular batch renames that no template and no RegExp could do. Like a "multiple hard rename".
Not really related, but you know what would be nice too? When "Drop Stack" will be there, if one could reorder files inside the DS as he wants (I mean drag&drop them within the List to order them as whishes), so when we trigger the Batch Rename we could have choosen the order in which files will be renamed, can be pretty usefull, especially when used with the counter/increment!

Yep, that's a cool idea I have not thought of yet. Actually it will work by itself because DS will be defined via Catalog, and in Catalog you can order items already by drag&drop. The list will initially follow that order unless you sort it by column headers.