It doesn't look like global.fileCnt is defined anywhere in your code... Where did you get this example from?
Thanks for the reply. From this
I'll need to know if the being processed file is the last one, then make some changes and display a prompt with details.
Read the paragraph that explains how to use global.FileCnt... You basically
have to run 2 batch sequences to know if a certain file is the last one (or
know in advance how many files you're processing).
On Sat, May 23, 2015 at 12:29 PM, lorraine123 <email@example.com>
Did you study the examples and look at section "Count PDF Files"?
Many of the following sequences use this block of code and check that it has created a variable
Count PDF files
Batch sequence name: Count PDF files.sequ.
The batch sequence Count PDF files.sequ counts the number of PDF files selected for processing, and assigns that value to the global variable global.FileCnt
The following routine is used by some of the sample sequences.
Example 2.1Count PDF files
/* Count PDF files */
if ( typeof global.FileCnt == "undefined" ) global.FileCnt = 0;
This sequence sets the global variable, global.FileCnt, equal to the number of selected files. If used prior to running another batch sequence that depends on this value, be sure the selected files are the same.