Hi,
is it possible to extract a substring (defined by regex or length) from the filename to "plot" it as text into the image?
I have files with names like
"1000x some words and numbers.jgp" or "250x some other words.jpg"
and want to extract the beginning number "1000" respectively "250" (the subsequent "x" may be included)
thanks in advance
Extract substring from filename
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 45068
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 2
- Joined: Wed Nov 06, 2013 9:19 am
Re: Extract substring from filename
would be a nice feature
-
- XnThusiast
- Posts: 4220
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Extract substring from filename
It might be possible to do it using a batch file that first calls a command line file renaming utility and then calls NConvert, if the required substring can be extracted to a variable, which is then written to the image using NConvert's -text syntax.X-Ray wrote: ... is it possible to extract a substring (defined by regex or length) from the filename to "plot" it as text into the image?
One command line batch renaming utility:
http://www.bulkrenameutility.co.uk/Download.php -- Scroll down for the command line version.
Note that I haven't used it myself, and only suspect that it might be able to copy a string from a filename to a variable.