photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Ted on February 04, 2014, 04:07:54 PM

Title: Renamer Question
Post by: Ted on February 04, 2014, 04:07:54 PM
I've tried every way that I can think of and so far have failed.  Hoping someone can help.

When renaming a file, I'd like to end up with a format like this: YYYYMMDD hhmmss-nnnn, where the first two parts are the date and time and following the the dash (-) is the last 4 digits of the original file name.  The date and time I've got, but am having a problem get the last 4 digits of the original filename.  If the original file has only 4 digits then I can get the digits from the 'Digits of Original File Name', but if it's more than 4 digits I fail.

Any suggestions?  There is probably a simple regexp, but I get lost in regexp.

Thanks.
Title: Re: Renamer Question
Post by: joel23 on February 04, 2014, 05:02:12 PM
After you'v set the date try 
-{File.Name|substrr:0,4}
in a text box.


[attachment deleted by admin]
Title: Re: Renamer Question
Post by: BenAW on February 04, 2014, 05:03:05 PM
Have a look at this post. (https://www.photools.com/community/index.php?topic=1046.msg6963#msg6963)
Title: Re: Renamer Question
Post by: Ted on February 04, 2014, 05:13:28 PM
Quote from: joel23 on February 04, 2014, 05:02:12 PM
After you'v set the date try 
-{File.Name|substrr:0,4}
in a text box.

Jörg,
That did it.  I was not tried the substrr. 
Thanks.