Moving/copying files

Questions and answers on how to get the most out of FFAStrans
Post Reply
kamilion
Posts: 10
Joined: Thu Jun 09, 2022 11:07 am

Moving/copying files

Post 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 5282 times

Attached I am sending a workflow containing the mentioned two nodes
Do you have any idea, how to fix it ?
Attachments
moving_files.json
(6.06 KiB) Downloaded 296 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Moving/copying files

Post 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.
emcodem, wrapping since 2009 you got the rhyme?
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Moving/copying files

Post 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
kamilion
Posts: 10
Joined: Thu Jun 09, 2022 11:07 am

Re: Moving/copying files

Post 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!
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Moving/copying files

Post 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
emcodem, wrapping since 2009 you got the rhyme?
kamilion
Posts: 10
Joined: Thu Jun 09, 2022 11:07 am

Re: Moving/copying files

Post 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 5219 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Moving/copying files

Post by emcodem »

Oh wow, you see lots of spaces instead of the file path. Can you export the workflow and share the json please?
emcodem, wrapping since 2009 you got the rhyme?
kamilion
Posts: 10
Joined: Thu Jun 09, 2022 11:07 am

Re: Moving/copying files

Post by kamilion »

here you are :)
Attachments
test.json
(7.29 KiB) Downloaded 294 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Moving/copying files

Post 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?
emcodem, wrapping since 2009 you got the rhyme?
Post Reply