Page 1 of 1

Flow to catch duplicate files

Posted: Mon Apr 30, 2018 8:18 pm
by neecerp
Has anyone set up a flow that would catch duplicate files coming through a folder in Switch?
I need it to catch a file with the same name no matter when it may show up. Whether within 1 minute or 5 days later.
We would like to then send a report via email, which is the easy part.

Any ideas? I was thinking maybe I could use Assemble job somehow, but I do not want to assemble anything.

Re: Flow to catch duplicate files

Posted: Tue May 01, 2018 1:08 am
by Zoranj
You could setup database to update with name of each file and check if it exist.

Re: Flow to catch duplicate files

Posted: Tue May 01, 2018 7:20 pm
by loicaigon
I second Zoranj. You need to store passed jobs either as a database call maybe writing down some file locally or whatever suits you.

Re: Flow to catch duplicate files

Posted: Wed May 02, 2018 10:40 pm
by neecerp
What kind of database? I am talking about using Switch flows.
Can you suggest examples?

Re: Flow to catch duplicate files

Posted: Wed May 02, 2018 11:25 pm
by Zoranj
I have both of these in active use

You setup database in MSSql or some other database.
For this you need database configurator license.
When file passes, you check database if the file name exist, if not you take name of the file and write it to database.
If file exist in database, you do whatever the action you want.

Loic's example would be "cheap" database made out of folder with files.
When file passes, you you use Inject Lite to check if file with name exist, if not inject txt file into folder repository and name it with file name.
If file exist, do whatever action you want.
In this case I am using Inject lite instead of regular Inject since it will not fail when it does not find file.

I hope this helps

Re: Flow to catch duplicate files

Posted: Thu May 03, 2018 6:13 pm
by flussidicaio
Hi,
with the scripting module it would be easy.
without you can try with "inject job".
See the attached file
flow.png
flow.png (20.12 KiB) Viewed 8210 times