I have also tried by generating a Preflight report for each document in the book.
The same happends, when running the compiled script it doesn't generate the report.
Am I missing any library to include?
Is there a bug?
I have noticed that I didn't said what version I'm using: InDesign CS6.
It's strange that you got it to work at all, because your file name is wrong: you should escape the backslashes:
But apart from that, what's that [. . .] doing in your path name? That looks wrong.
The string "C:\[...]\Preflight.txt" is just the path where it generates the file. I wrote "[...]" to say that there are more folders in the structure.
I wrote that trying to be more clear, objective not achieved.
The line that I have in my script is the following:
var filePreflight = new File(folder.fsName + utils.getFileSeparator() + jobName + "_Preflight.txt");
Among the tests I have done, I have write a line in the file before running the Preflight. It wrote the line but didn't filled the file with the Preflight report.
Thanks for the interest and the answer.
Someone that could help me?