Page 1 of 1

Count files in flow folder

Posted: Tue Jan 04, 2022 7:47 pm
by franklintempleton
I have a flow which starts with folder input. Within the folder is a subfolder called "Supplements". The flow routes all files within the supplements folder to another folder where they are inserted into any files submitted in the job.Image
The flow works great when there is a single supplement file in the flow. In the case where two or more supplements are included, I am trying to route the files to another folder to merge them into a single file and return back to the flow. I am having trouble counting the files within the folder so that jobs with 2 or more supplements go on one route and the jobs with single supplement files go another route. Suggestions?
folder.gif
folder.gif (7.16 KiB) Viewed 4679 times

Re: Count files in flow folder

Posted: Tue Jan 04, 2022 7:55 pm
by jan_suhr
You have the variable Job.FileCount you can play with.

Re: Count files in flow folder

Posted: Wed Jan 05, 2022 12:32 am
by franklintempleton
I did try that but Job.FileCount only counts files in a job and I have dismantled the job into individual files so it always returns "1".

Re: Count files in flow folder

Posted: Wed Jan 05, 2022 7:32 am
by jan_suhr
Can't you use Job.FileCount before you dismantle and add the count number as Private Data to the job?

Re: Count files in flow folder

Posted: Wed Jan 05, 2022 9:37 am
by JimmyHartington
Could an option be to always move the supplements folder til be merge as a pdf. One file still should give a pdf.
And more files would just get merged.

Re: Count files in flow folder

Posted: Tue Jan 25, 2022 4:59 pm
by franklintempleton
Thanks for the feedback. I ended up putting the supplements and the files that need them in separate folders and using the Sort configurator to send them along different paths where I could use the Files.Count data to count files in the folders.