Watch Folder_Wait for File Copy to complete

Questions and answers on how to get the most out of FFAStrans
dklooker
Posts: 29
Joined: Mon May 22, 2017 1:22 pm

Re: Watch Folder_Wait for File Copy to complete

Post by dklooker »

Hi,

It seems to work. I adjusted the batch code a bit copy /b %1 +,, -> copy /b %1 +,, %1 because it gave an access denied error and kept on looping after file copy was finished. Now it says that an other proces is using the file. I will keep on testing this workflow and then it would be great to implement it into the folder monitor node.

Thanks for now!

Kind regards,
David
Attachments
Readyness2.png
Readyness2.png (122.1 KiB) Viewed 6734 times
dklooker
Posts: 29
Joined: Mon May 22, 2017 1:22 pm

Re: Watch Folder_Wait for File Copy to complete

Post by dklooker »

Hi,

Probably a side effect of the copy /b command, but I now counted 2 times out 5 that a file I dropped in the watchfolder becomes 0 bytes in filesize. Just right after the batch files closes. FFAStrans also gives an error on the next node that no video and audio found, but this is of course a consequence the file has become 0 bytes.

Is there something I can change in the batchfile? Maybe a hold function for a few seconds?

David
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Watch Folder_Wait for File Copy to complete

Post by emcodem »

Hm maybe because you added the ‰1 to the COPY /B
But it dont matter, the method is Not secure anyway. I will send a small exe that does the same as the batch but in a secure way.
emcodem, wrapping since 2009 you got the rhyme?
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Watch Folder_Wait for File Copy to complete

Post by emcodem »

@dklooker
wait_for_file.au3.txt
(886 Bytes) Downloaded 439 times
OK, so here is some safe way to wait until the file is ready, it will at least not destroy any soruce file :D
Rename the downloaded file from .txt to .au3, save to FFAStrans\Processors\plugin_nodes\

Commandline processor usage like this:

Code: Select all

%comspec% /C ""%s_ffastrans_dir%\Processors\exe_manager.exe" /AutoIt3ExecuteScript "%s_ffastrans_dir%\Processors\plugin_nodes\wait_for_file.au3" "%s_source%""

Discussion about how we solve it possibly in a next version is ongoing.
emcodem, wrapping since 2009 you got the rhyme?
dklooker
Posts: 29
Joined: Mon May 22, 2017 1:22 pm

Re: Watch Folder_Wait for File Copy to complete

Post by dklooker »

Hi,

This is working perfectly. I will implement this additional node in new workflows.

Thank you very much!
David
graham728
Posts: 81
Joined: Sat Oct 13, 2018 10:54 pm

Re: Watch Folder_Wait for File Copy to complete

Post by graham728 »

At what stage should I introduce this commandline processor? - Just after the Monitor Node?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Watch Folder_Wait for File Copy to complete

Post by momocampo »

Hey Graham,

I think the answer should be yes. Place your wait_for_file.au3 in the FFAStrans\Processors\plugin_nodes\ folder and it should work with monitor folder then command executor node.
I think Emcodem could confirm but it sounds good.
Cheers.
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Watch Folder_Wait for File Copy to complete

Post by emcodem »

confirmed :D
emcodem, wrapping since 2009 you got the rhyme?
Post Reply