Page 1 of 1

Moving/copying files

Posted: Thu Oct 19, 2023 12:23 pm
by kamilion
Hello all!
I have a little problem with FFAStrans. I would like to make some automatization in my workflow.

Case concerns two nodes, first one is "Folder" which is monitoring one of the location where I'm coping or moving files from another disc location (it checks file growth continuously) and after finished coping, next node, which is "Command Executor" is moving from location included in "Folder" node to the next location. Unfortunately is not working properly, because node command executor (second node) is starting before file in node "Folder" is copied or moved fully, so next conversion processes cannot be done.
moving.jpg
moving.jpg (130.78 KiB) Viewed 5286 times

Attached I am sending a workflow containing the mentioned two nodes
Do you have any idea, how to fix it ?

Re: Moving/copying files

Posted: Thu Oct 19, 2023 1:29 pm
by emcodem
Hi kamilion,

the setting check growing "continuously" is definitely not what you want, it is for starting the job whenever the file changes (very rarely used).
Can you try if "once" does the job for you?

Also you can potentially use the deliver processor instead of custom cmd (it has a "move" checkbox).
Also in the cmd proc, you could use %s_source% instead of s_original_full but that does not matter, both lead to the same result in your case.

Re: Moving/copying files

Posted: Thu Oct 19, 2023 2:49 pm
by admin
Hi kamilion,

I think the devil might be in the "Skip source verification" option which effectively disregard if the file is ready to be opened or not. So once it finds a new file it don't care if it's finished, it will just send it to the next node. So de-select this option and try again.

-steinar

Re: Moving/copying files

Posted: Fri Oct 20, 2023 7:53 am
by kamilion
Thanks for reply!
Finally I've found a reason. When I'm copying or moving something to my main storage, which is used in the first node, data size doesn't increase, so FFAStrans assumes that file is copied, so it doesn't know that the process is not completed and go ahead with another nodes. Is there a possibility to add into second node "command executor" option that validates if the file finished copied and is valid (i.e opens), not just verifies the weight gain?
Best!

Re: Moving/copying files

Posted: Fri Oct 20, 2023 9:04 am
by emcodem
kamilion wrote: Fri Oct 20, 2023 7:53 am When I'm copying or moving something to my main storage, which is used in the first node, data size doesn't increase
Yes, windows explorer copy allocates the whole file size at the start so the file size never changes while copy is in progress.
FFASTrans watchfolders are of course aware about that, they try to open the file for reading BUT only when you do not check "Skip source verification" as Steinar just said.

However, on some weird Storages it might be possible to open the file for reading while it is being copied by windows explorer. In this case we can check if the file is finished by waiting until we can open it for writing (instad of open for reading). We did that for example in this thread:https://ffastrans.com/frm/forum/viewtop ... t=10#p6609

Re: Moving/copying files

Posted: Fri Oct 20, 2023 10:13 am
by kamilion
Thanks!
"Skip source verification" is off, I made that correction.

I've implemented that function: "wait_for_file.au3" and its working, but when file is not ready, it interrupts the entire process, like in screen below"
wait_for_file.jpg
wait_for_file.jpg (76.73 KiB) Viewed 5223 times

Re: Moving/copying files

Posted: Fri Oct 20, 2023 12:45 pm
by emcodem
Oh wow, you see lots of spaces instead of the file path. Can you export the workflow and share the json please?

Re: Moving/copying files

Posted: Fri Oct 20, 2023 1:21 pm
by kamilion
here you are :)

Re: Moving/copying files

Posted: Mon Oct 23, 2023 7:16 am
by emcodem
OK so the workflow is fine, everything works as expected.
In your screenshot we see that the error is not about the script itself but in the FFAStrans status monitor in the background, we see that "Source" consists of lots of spaces and ends with "\test.mov".
The error must be with the way you submitted the file path for processing. Did you do API submit or manual submit?
Can you reproduce the error with the test workflow you sent and watchfolder submit actually?