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.
batch rename; shift range of numbered filenames
-
admin
- Site Admin
- Posts: 65185
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: batch rename; shift range of numbered filenames
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: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.
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>
"...
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?
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?
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:guster wrote:But, t<#3> stripped the extension.
Just tried it quickly to make sure, t<#1> kept the extensions untouched for me...
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 usualguster wrote:Can a long list be defined in the pattern, rendering selection unnecessary?
Not sure I understand you there. You mean the original filenames? If so, just sort your list by Namesguster wrote:And, can the operation order be made implicit by the prior filenames (t3, t4, t5, t6 ...)?
Proud XYplorer Fanatic
-
admin
- Site Admin
- Posts: 65185
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
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".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 ...)?
selection filter
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.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".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 ...)?
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
I always just install over the prior vers...just make sure XY isn't running at the time!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?
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.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
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!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".
Proud XYplorer Fanatic
-
admin
- Site Admin
- Posts: 65185
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
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.jacky wrote: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!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".
XYplorer Beta Club