When an input file generates multiple output PDF files, I need to keep Communications Server from overwriting output PDF document files. I thought I could use FileCopy in a script to create uniquely named files using a counter, but it still seems to be overwriting. Here is the script:
$file_count++;
$err=FileCopy("/data/opentext/projects/ebsnp/rma_fp/output/default_rma_fp.pdf", "/data/opentext/projects/ebsnp/rma_fp/output/" + $file_count + "_rma_fp.pdf");
if(num($err)!=0)
{
$errtext=ioerrtext($err);
log(0,"Errortext "+$errtext);
}
I've tried the script after processing in the output connector, after document in the output connector, and after engine, but all of them still overwrite. I'm wondering if my method is incorrect. What is the proper method of doing this? Is there a way to pass a name from Exstream Design Manager to Communications Server to use?