I have many files like this:
5113 description a
5113 description b
5114 description c
5115 description d
5116 description e
5117 description f
5118 description g
...
55xx description abcde
You see at the second line is a double number :-(.
Now i will repair the leading numbers into:
5113 description a
5114 description b
5115 description c
5116 description d
5117 description e
5118 description f
5119 description g
...
55xx description abcde
But i find no way with the renamer to set this names.
My first trial:
File Number (# of the file) !!! No way to set an prefix - the field ist grey!!!
Original File Name
SubStr (Start: 5 and all following characters)
But this ist the preview:
5113 description a
5113 description b
5114 description c
5115 description d
5116 description e
5117 description f
5118 description g
...
same like the original!!
The i play with the settings and take File Number at the end:
Original File Name
SubStr (Start: 5 and all following characters)
File Number (# of the file) !!! No way to set an prefix - the field ist grey!!!
description a0001
description b0002
description c0003
description d0004
description e0005
description f0006
description g0007
Very strange!
Same processing instructions only sorted diffently, but another result with the numbers.
How can i repair the leading numbers of my files with the renamer?
The prefix in the file number is disabled because prefix are not supported by that feature.
You can achieve the same effect by just adding a text step before the file number step.
The file number step appends a number to make file names unique, and only if there is a duplicate file name. Since your descriptions differ, no dupe file name, no file number.
I think what you really want is a global sequence number?
QuoteThe file number step appends a number to make file names unique,
I don't use "Unique Number" i use "File Number".
What i need is the filename starting at postion 5 and at the beginning a 4 digit number starting with 5113 to repair the names.
I think i can not do this with the renamer.
Ok, i can start the renaming with pic 5100... (first pic starts with 5000...)
I set
"Text and Variables" --> 51
"Global Sequence Number" --> 2 digits
this gives me the correct numbering
but i need the
"Original File Name" starting at pos 5 to delete the false beginning numbers.
Try this!
You must change the Global Sequence number to the wanted number of the first file, of course.
The "Remove Text" step must have "Regular Expression" checked.
Quote from: thrinn on May 08, 2021, 07:15:55 PM
Try this!
You must change the Global Sequence number to the wanted number of the first file, of course.
The "Remove Text" step must have "Regular Expression" checked.
Big THANK YOU!
It runs :-).
You are welcome.
In fact, this is based on a more generic solution for retaining filename suffixes of variable length, posted by sinus some time ago: https://www.photools.com/community/index.php?topic=8977.0 (https://www.photools.com/community/index.php?topic=8977.0)
So, we both can thank Markus in turn :)