View previous topic :: View next topic |
Author |
Message |
tdwyer
Joined: 08 Mar 2012 Posts: 3
|
Posted: Thu Oct 30, 2014 1:23 am Post subject: Adding a counter mid-filename |
|
|
So I figured out how to add a counter to the start of a file name. And to the end. And I can change the start value and the increment. But I can't figure out how to add it in a specific place.
I have filenames of the format yymmddab - Description.jpg
yy, mm, dd are numeric and a and b are lower case letters, where none, one or two of them are present.
I want to add a hyphen and a counter value at position 7 in the string. Deleting the 0, 1 or 2 characters would be a bonus.
The desired result will be yymmdd-counter - Description.jpg.
Surely this can be done.
(This is a really useful and fun utility.....interesting to see what others are using it for) |
|
Back to top |
|
 |
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Fri Oct 31, 2014 2:22 am Post subject: |
|
|
Enter the following in the custom renaming creator (don't include the single quotes):
Row: 1
Search: '^(.{6,6}).*? - (.*)'
Replace: '\1 -\2'
Row: 2
Search:
Replace: '*Insert Counter after*Position*6*of*Prefix*'
The first row gets rid of the characters between the 6 character date and the first '-'.
The second row inserts the counter after the 6 character date.
You can also insert the second line by setting up the pre-defined command to insert a counter after position 6 and hitting 'Insert in List'.
Before hitting 'scan', go to the options window and configure the counter insertion so that the counter is preceded by a '-'
Then hit Scan.
Hope that helps.
Peter. |
|
Back to top |
|
 |
tdwyer
Joined: 08 Mar 2012 Posts: 3
|
Posted: Sun Nov 02, 2014 3:10 am Post subject: |
|
|
Peter, thank you. Worked like a charm. I don't understand it, but it worked. |
|
Back to top |
|
 |
|