Page 1 of 1

glob. variables within filename

Posted: Tue May 26, 2015 3:47 pm
by nikolas1612
Acording to manual: Single file Output (join input files together) - The filename can contain Environment Variables escaped between % signs e.g. %TEMP%\myfile.txt, and macros or global variables.
While processing I create a global variable by "Capture text" method or this structure (?P<gvar>......) inside replace filter. I can make sure everything is right by placing them in text freely.
Yet none of them appear in my filename. I see just blank space. What's more, the glob. variable created by "Capture text", having been successfully changed and not altered, returns it's initial value to filename. Why?

The initial task was to start my filename by date in this format: 2015.03.15 (instead of 20150315 allowed by @date variable).

Re: glob. variables within filename

Posted: Tue Jun 02, 2015 2:37 pm
by DataMystic Support
Ah, the output filename is opened before the text is pushed through the filter.

Try using a variant of \sysadmin\rename files according to contents

to rename the file after processing it, in the endfile() function.