Copy file to multiple folders and move it to a "Processed Files" at the end

Questions and answers on how to get the most out of FFAStrans
Post Reply
LCA
Posts: 9
Joined: Mon Apr 06, 2020 9:34 pm

Copy file to multiple folders and move it to a "Processed Files" at the end

Post by LCA »

Hi

I'm working in a workflow where I need to deliver a file to multiple folders and then move the original file to a "processed folder". The problem is that I can't garantee the sequence of the processes and if I mark "Move instead of Copy" in one of the deliveries, other processes can fail because of the original file had been moved.

How can I solve this situation?

Thanks

Conrado
momocampo
Posts: 598
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Copy file to multiple folders and move it to a "Processed Files" at the end

Post by momocampo »

Hi Conrado,

You can use a hold node to synchronize all your branches. This will allow you to move your original file without any issue at the end of your workflow.
So put a hold node like this :

hope it helps.
Cheers.
Attachments
hold.png
hold.png (50.44 KiB) Viewed 198 times
emcodem
Posts: 1863
Joined: Wed Sep 19, 2018 8:11 am

Re: Copy file to multiple folders and move it to a "Processed Files" at the end

Post by emcodem »

This explains why benjamins approach will end up with 2 failed and 1 success jobs
viewtopic.php?p=3565#p3565
3 branches try to move original file but only one can succeed, the hold and sync option in this case is not 3 in 1 out but 3 in 3 out - even when it looks different on the GUI.

This is one way to handle the situation without errors:
https://www.ffastrans.com/frm/forum/vie ... 3&start=10
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 598
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Copy file to multiple folders and move it to a "Processed Files" at the end

Post by momocampo »

Yeahhh Emcodem, you are right, i'm sorry i answered too quickly...But once i do it before you :)
Another way might be to use a hold function to pause the branch with the process taking the longest time.

Anyway, your solution is really more complicated but maybe there is no other way.
Thanks to you Emcodem
LCA
Posts: 9
Joined: Mon Apr 06, 2020 9:34 pm

Re: Copy file to multiple folders and move it to a "Processed Files" at the end

Post by LCA »

It was a little more complicated than I expected.
Great Job.

Thanks
Post Reply