Hello All,
I'm trying to get a count of the number of records within the csv files being placed into the input for my switch flow then output this count into an excel report.
Multiple different files can be placed into the flow throughout the day and ideally I would get a final count of each file into one report at the end of the day and have that sent out.
Could someone help point me in the right direction on how to do this?
Many Thanks
File count to report writing
Re: File count to report writing
In the File class you have a function readLines()
Search in the Scripting manual for "lines"
Search in the Scripting manual for "lines"
-
- Member
- Posts: 93
- Joined: Fri Jul 08, 2011 10:31 am
- Location: The Netherlands
Re: File count to report writing
First you should write a scripts which processes the incomming files. It should open the csv-file and read the number of lines in it.
Then append this number and the job-name in another csv-file. Both number and the job-name should be on the same line and separated by a comma, tab or semi-colon.
Then add an "inject job" to your flow and configure it to inject the created csv-file at a "time of day"
Robert
Then append this number and the job-name in another csv-file. Both number and the job-name should be on the same line and separated by a comma, tab or semi-colon.
Then add an "inject job" to your flow and configure it to inject the created csv-file at a "time of day"
Robert
Re: File count to report writing
This script/app counts on line breaks using the method Jan mentioned above:
- https://github.com/open-automation/switch-count-rows
- https://www.enfocus.com/en/appstore/product/count-rows
- https://github.com/open-automation/switch-count-rows
- https://www.enfocus.com/en/appstore/product/count-rows
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Re: File count to report writing
Thanks all