Hi, I have a workflow that splits twice giving me a total of three paths each leading to its own encode and output.
At the end of the workflow I want to delete the source file, but I don't know necessarily which path will complete last and obviously I can't delete the source before it's freed up.
How best do I approach this?
Here's is screenshot:
Waiting for multiple forks
Re: Waiting for multiple forks
Hi dylanreeve, thank you for using FFAStrans and welcome to the forum!
First, looking at your screenshot the workflow is invalid. In order to use filters you must place the "A/V Media"-decoder after the "Folder"-monitor. If not your workflow will fail.
Now to your question: Depending on your level of expertise when it comes to batch scripts, you can alway create one that checks if all your output files exists and if they do, delete the original. Or, you can use an undocumented function feature called '$exists("filename")' from within the "Conditional"-node: Use can use the "Populate variables"-node to contruct your output filenames or you can mimic the file name settings from your "Folder"-delivery node. Pipe all your output nodes to this one followed by a "Command executor" that performs the deletion of your original if the "Conditional"-node succeeds.
Note that the "$exists()"-function is NOT 100% tested but should work and will not cause any harm.
-steinar
First, looking at your screenshot the workflow is invalid. In order to use filters you must place the "A/V Media"-decoder after the "Folder"-monitor. If not your workflow will fail.
Now to your question: Depending on your level of expertise when it comes to batch scripts, you can alway create one that checks if all your output files exists and if they do, delete the original. Or, you can use an undocumented function feature called '$exists("filename")' from within the "Conditional"-node: Use can use the "Populate variables"-node to contruct your output filenames or you can mimic the file name settings from your "Folder"-delivery node. Pipe all your output nodes to this one followed by a "Command executor" that performs the deletion of your original if the "Conditional"-node succeeds.
Note that the "$exists()"-function is NOT 100% tested but should work and will not cause any harm.
-steinar
-
- Posts: 12
- Joined: Fri Aug 19, 2016 4:37 am
Re: Waiting for multiple forks
Thanks.
I realised I was missing the A/V Media decoder when I looked at the screenshot afterward... Oddly the workflow does actually work exactly as expected with the structure shown above, but I will amend it.
Some sort of Wait node would be handy... I could feed all three paths into is and wait for input on all of them, then continue out.
Thanks - I'll test out this conditional with the $exists function.
I realised I was missing the A/V Media decoder when I looked at the screenshot afterward... Oddly the workflow does actually work exactly as expected with the structure shown above, but I will amend it.
Some sort of Wait node would be handy... I could feed all three paths into is and wait for input on all of them, then continue out.
Thanks - I'll test out this conditional with the $exists function.
Re: Waiting for multiple forks
I really don't see how that workflow would work as expected, unless the "A/V Media" is hidden beneath one of the other upper nodes...
-steinar
-steinar
Re: Waiting for multiple forks
The workflow can process without "A/V Media" node in case of *.AVS source files
Alexander Sorkin
Re: Waiting for multiple forks
Yes of course but that requires very specific conditions in the AVS-file picked up. I think dylanreeve would know this and not find it odd that it works
-steinar
-steinar