How to stop a flow if file does not exist

Post Reply
netaware
Member
Posts: 33
Joined: Tue Jul 30, 2024 7:11 pm

How to stop a flow if file does not exist

Post by netaware »

Hello,
I have a flow that processes hundreds of files.

On activating the flow, I would like to check for a log file first, if it exists, process the many files, if it does not exist, do not process the many files and send an email.

I do not know how to do this. Can anyone give me some suggestions?

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

Re: How to stop a flow if file does not exist

Post by jan_suhr »

Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
netaware
Member
Posts: 33
Joined: Tue Jul 30, 2024 7:11 pm

Re: How to stop a flow if file does not exist

Post by netaware »

I tried it but i cannot get it to work with network path.

I wrote a script that is working.

But I want to stop the flow completely if the file does not exist.
mkayyyy
Member
Posts: 107
Joined: Mon Nov 21, 2016 6:31 pm
Location: UK

Re: How to stop a flow if file does not exist

Post by mkayyyy »

If you're wanting to stop the flow like you do in the Switch Designer, you could use the Switch Web Services REST API: https://cdn-www.enfocus.com/manuals/Dev ... s-StopFlow
jan_suhr
Advanced member
Posts: 709
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: How to stop a flow if file does not exist

Post by jan_suhr »

netaware wrote: Thu May 07, 2026 5:33 pm I tried it but i cannot get it to work with network path.

I wrote a script that is working.

But I want to stop the flow completely if the file does not exist.
It does work with network paths, you have to write them correctly as an inline value in the properties.
2026-05-08_09-48-01.png
2026-05-08_09-48-01.png (10.83 KiB) Viewed 3810 times
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
freddyp
Advanced member
Posts: 1187
Joined: Thu Feb 09, 2012 3:53 pm

Re: How to stop a flow if file does not exist

Post by freddyp »

Do you really want to stop the flow? If you do it will have to get started again one way or another, and how are you going to do that?

I think you would be better off with the "Wait for asset" app. As the name suggests jobs will be held in the flow if a file is missing and when the file all of a sudden appears the jobs continue because the flow is still active; no action required.

https://www0.enfocus.com/en/appstore/pr ... -for-asset
There is also a + version:
https://www0.enfocus.com/en/appstore/pr ... or-asset-0
Post Reply