Hi
I have pdf´s that I need to rename at output. Actually I just need to remove a segment within the name.
Usually the files are named with this syntax:
S60_15w46_V1_DEde.pdf
But there can be variations in the first segment:
XC60_15w46_V1_DEde.pdf
V60CC_15w46_V1_DEde.pdf
(There can alos be variations in the digits and country code, but not in length)
And I need to remove the ”_V1_” from the filename. And replace it with just a ”_". Or just remove "V1_".
I know how to match the whole name with regular expressions.
([A-Za-z0-9]*)_([0-9][0-9])w([0-9][0-9])_V([0-9])_([A-Z][A-Z])([a-z][a-z])\.(pdf|PDF)
And the first segment:
([A-Za-z0-9]*)_([0-9][0-9])w([0-9][0-9])
V60CC_15w46_V1_DEde.pdf
And also the last segment:
(([A-Z][A-Z])([a-z][a-z])\.(pdf|PDF))
XC60_15w46_V1_DEde.pdf
But I can not figure out how to use the two segments in the output name.
Any suggestions?
Thanks.
Rename PDF with regular expressions
If you can script, you can easily get the values of your regular expression like this: http://forum.enfocus.com/viewtopic.php? ... .cap#p4096
Again, if you can use scripter, the easiest way is to write your new name into private data then pass it into a rename configurator.
Again, if you can use scripter, the easiest way is to write your new name into private data then pass it into a rename configurator.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Hi again.
I found a solution after some heavy googling and some testing.
I used the Rename Job configurator and a two action step in properties where I select the two parts I needed.
Action 1 renames and action 2 adds a prefix by selecting last part then first part with regex.
Cheers
/Pär
I found a solution after some heavy googling and some testing.
I used the Rename Job configurator and a two action step in properties where I select the two parts I needed.
Action 1 renames and action 2 adds a prefix by selecting last part then first part with regex.
Cheers
/Pär
If what you are removing is always "_V1_" you could just use the "search and replace" in the rename configurator. Search for "_V1_" and replace with "_".
I think you could still use Search and Replace.
Search for: _V([0-9])_ (as regular expression)
Replace with: _ (Inline value)
Search for: _V([0-9])_ (as regular expression)
Replace with: _ (Inline value)