How to get file and folder count of the first level of a job folder
Posted: Tue Jul 05, 2011 5:41 pm
Hello,
I'm looking to find a way to get the file and folder count of the first level of a Job folder to be able to assemble it back.
So if a job Folder contain 3 pdf and 2 folder, I want to be able to put "5" on my private data key (.NumFiles).
Actually "job.getFileCount()" don't work because it calculate all files excluding folder. Any Idea? Thanks!
function jobArrived( s : Switch, job : Job )
{
var InputJob = job.getPath();
var Filecount = job.getFileCount();
job.setPrivateData( "Ungroup.NumFiles", Filecount);
job.sendToSingle(InputJob);
}
I'm looking to find a way to get the file and folder count of the first level of a Job folder to be able to assemble it back.
So if a job Folder contain 3 pdf and 2 folder, I want to be able to put "5" on my private data key (.NumFiles).
Actually "job.getFileCount()" don't work because it calculate all files excluding folder. Any Idea? Thanks!
function jobArrived( s : Switch, job : Job )
{
var InputJob = job.getPath();
var Filecount = job.getFileCount();
job.setPrivateData( "Ungroup.NumFiles", Filecount);
job.sendToSingle(InputJob);
}