Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


anderz
2016-12-21T12:43:19Z
I am trying to rename files with some variables that include the need to reuse parts of the original filename together with fixed characters.
I have asked a similar question earlier and it was answered, referring to release notes for version 6.0.0 "6.0.0 - loop support and more". This was back in 2011 and the need for this solution vanished. Now it has reappeared. I some more advice on what techniques to use, at least where to look for documentation.
How can i call a specific parts of the original filename to be included in different positions in the new filename?
example:
ABBSA1-1304-1-003-T.pdf (newspapercode 4 char)(section 2 char)-DDMM-1-(pagenumber 3 char)-T.pdf
renamed to
BUAB_20160413_1_01_003.pdf (newspapercode 4 char)_YYYYMMDD_1_(section 2 char)_(pagenumber 3 char).pdf
I cannot use dateformat variable as date is not always relative to present date, but date positions have to be altered DDMM to MMDD
I want to collect the position 14-16 (003) in the original filename and put them into position 20-22 in the renamed file.
Is it possible to do this with the "Postprocess mask with variable" option, or do I have to create multlple tasks to alter the filename the way I need to?
Thanks.
Sponsor
Forum information
thomas
2016-12-22T09:06:20Z
Something like this in the post process box could work:

BUAB_2016{STRING(Substring|{NEWNAME()}|9|2)}{STRING(Substring|{NEWNAME()}|7|2)}_1_01_{STRING(Substring|{NEWNAME()}|14|3)}.pdf (newspapercode 4 char)_YYYYMMDD_1_(section 2 char)_(pagenumber 3 char).pdf


I just hardcoded the year 2016 in this example.
Scroll to Top