Count files in flow folder

Post Reply
franklintempleton
Newbie
Posts: 8
Joined: Fri Nov 19, 2021 8:15 pm

Count files in flow folder

Post by franklintempleton » Tue Jan 04, 2022 7:47 pm

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 2557 times

jan_suhr
Advanced member
Posts: 491
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Count files in flow folder

Post by jan_suhr » Tue Jan 04, 2022 7:55 pm

You have the variable Job.FileCount you can play with.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

franklintempleton
Newbie
Posts: 8
Joined: Fri Nov 19, 2021 8:15 pm

Re: Count files in flow folder

Post by franklintempleton » Wed Jan 05, 2022 12:32 am

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".

jan_suhr
Advanced member
Posts: 491
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Count files in flow folder

Post by jan_suhr » Wed Jan 05, 2022 7:32 am

Can't you use Job.FileCount before you dismantle and add the count number as Private Data to the job?
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

User avatar
JimmyHartington
Member
Posts: 116
Joined: Tue Mar 22, 2011 7:38 am

Re: Count files in flow folder

Post by JimmyHartington » Wed Jan 05, 2022 9:37 am

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.

franklintempleton
Newbie
Posts: 8
Joined: Fri Nov 19, 2021 8:15 pm

Re: Count files in flow folder

Post by franklintempleton » Tue Jan 25, 2022 4:59 pm

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.

Post Reply