Deliver to the *first folder* after watchfolder
Deliver to the *first folder* after watchfolder
Hi
Need help and advice - how to deliver files to the first folder after watchfolder in wich they stored.
Or make variable %_original_path+n% - Folder name n-step forward begin from UNC-path.
What i mean:
1. Monitor->Folder:
\\server_1\share\%i_year%-%i_mon%-%i_mday%\CARD_1\PRIVATE\XDROOT\Clip - Clip0001....Clip00nn.mxf
\\server_1\share\%i_year%-%i_mon%-%i_mday%\CARD_2\PRIVATE\Clip - Clip0001....Clip00nn.mxf
\\server_1\share\%i_year%-%i_mon%-%i_mday%\CARD_3\Clip - Clip0001....Clip00nn.mxf
2. Encode to mp4
3. Deliver->Folder:
\\server_2\share\%i_year%-%i_mon%-%i_mday%\CARD_1 - Clip0001....Clip00nn.mp4
\\server_2\share\%i_year%-%i_mon%-%i_mday%\CARD_2 - Clip0001....Clip00nn.mp4
\\server_2\share\%i_year%-%i_mon%-%i_mday%\CARD_3 - Clip0001....Clip00nn.mp4
Need help and advice - how to deliver files to the first folder after watchfolder in wich they stored.
Or make variable %_original_path+n% - Folder name n-step forward begin from UNC-path.
What i mean:
1. Monitor->Folder:
\\server_1\share\%i_year%-%i_mon%-%i_mday%\CARD_1\PRIVATE\XDROOT\Clip - Clip0001....Clip00nn.mxf
\\server_1\share\%i_year%-%i_mon%-%i_mday%\CARD_2\PRIVATE\Clip - Clip0001....Clip00nn.mxf
\\server_1\share\%i_year%-%i_mon%-%i_mday%\CARD_3\Clip - Clip0001....Clip00nn.mxf
2. Encode to mp4
3. Deliver->Folder:
\\server_2\share\%i_year%-%i_mon%-%i_mday%\CARD_1 - Clip0001....Clip00nn.mp4
\\server_2\share\%i_year%-%i_mon%-%i_mday%\CARD_2 - Clip0001....Clip00nn.mp4
\\server_2\share\%i_year%-%i_mon%-%i_mday%\CARD_3 - Clip0001....Clip00nn.mp4
Re: Deliver to the *first folder* after watchfolder
Hi artjuice,
welcome to the forum and thank you for using FFAStrans!
Very good question and not too easy to solve. The all time favourite "regex" is your friend The following examples assume that you create a new user_variable and assign a value to it in populate variables processor.
This for example works if you always have at least 2 subfolders e.g. %watchfolder%\CARD1\Clips:
%s_my_toplevel_path% = $regext("%s_recursed_path%","\\(.*?)\\")
This example is a little bit more complex but it adds support for only 1 subfolder and multiple subfolders in one shot e.g. %watchfolder%\Clips OR %watchfolder%\CARD1\Clips:
%s_my_toplevel_path% = $regext("%s_recursed_path%","\\(.*?)\\|\\(.*?)$")
Then you set delivery processor prefix to "%s_my_toplevel_path% - "
Going on, you can skip one folder by prepending \\.*?\\, e.g. get the second subfolder after %watchfolder%
%s_my_toplevel_path% = $regext("%s_recursed_path%","\\.*?\\(.*?)\\")
Unfortunately this will only work with watchfolders and not using manual submit or API because s_recursed_path only has an actual value when the job has been started by watchfolder processor. What i do to speed up testing is in workflow properties, set sleep timer to 5.
Sidequestion: you really got clips in "private"? What kind of obscure misuse of the xdcam disc is this?
welcome to the forum and thank you for using FFAStrans!
Very good question and not too easy to solve. The all time favourite "regex" is your friend The following examples assume that you create a new user_variable and assign a value to it in populate variables processor.
This for example works if you always have at least 2 subfolders e.g. %watchfolder%\CARD1\Clips:
%s_my_toplevel_path% = $regext("%s_recursed_path%","\\(.*?)\\")
This example is a little bit more complex but it adds support for only 1 subfolder and multiple subfolders in one shot e.g. %watchfolder%\Clips OR %watchfolder%\CARD1\Clips:
%s_my_toplevel_path% = $regext("%s_recursed_path%","\\(.*?)\\|\\(.*?)$")
Then you set delivery processor prefix to "%s_my_toplevel_path% - "
Going on, you can skip one folder by prepending \\.*?\\, e.g. get the second subfolder after %watchfolder%
%s_my_toplevel_path% = $regext("%s_recursed_path%","\\.*?\\(.*?)\\")
Unfortunately this will only work with watchfolders and not using manual submit or API because s_recursed_path only has an actual value when the job has been started by watchfolder processor. What i do to speed up testing is in workflow properties, set sleep timer to 5.
Sidequestion: you really got clips in "private"? What kind of obscure misuse of the xdcam disc is this?
emcodem, wrapping since 2009 you got the rhyme?
Re: Deliver to the *first folder* after watchfolder
Wow!)
@emcodem big thx! I will try it.
from my folder structure example, i think it the right choice:
@emcodem big thx! I will try it.
from my folder structure example, i think it the right choice:
Hah, its just for an example that subfolders can be with different structure and depth
Last edited by artjuice on Tue Mar 21, 2023 9:13 pm, edited 1 time in total.
Re: Deliver to the *first folder* after watchfolder
Nope, it doesn't work for me.
Maybe I'm doing something wrong...
The result I get is:
all encoded video from CARD_1, 2, 3 goes to one folder \\server_2\share\%i_year%-%i_mon%-%i_mday%\0
Yep, it was my mistace, i thast somehow set varuable type as integer.
This work fine, thx:
Maybe I'm doing something wrong...
The result I get is:
all encoded video from CARD_1, 2, 3 goes to one folder \\server_2\share\%i_year%-%i_mon%-%i_mday%\0
Yep, it was my mistace, i thast somehow set varuable type as integer.
This work fine, thx:
Re: Deliver to the *first folder* after watchfolder
Glad you got it working, have fun working with FFAStrans
emcodem, wrapping since 2009 you got the rhyme?
Re: Deliver to the *first folder* after watchfolder
Also, i have one more thing - need to do some protection in case of mistace copy, can you help?)
if files (Clip0001....Clip00nn) in a root of %watchfolder% deliver them to a specified folder "OTHERS":
%watchfolder%\ files Clip0001....Clip00nn
%watchfolder%\ CARD_1\PRIVATE\XDROOT\Clip - Clip0001....Clip00nn.mxf
%watchfolder%\ CARD_2\PRIVATE\Clip - Clip0001....Clip00nn.mxf
%watchfolder%\ CARD_3\Clip - Clip0001....Clip00nn.mxf
%deliverfolder%\ OTHERS\Clip0001....Clip00nn
%deliverfolder%\ CARD_1\Clip0001....Clip00nn.mxf
%deliverfolder%\ CARD_2\Clip0001....Clip00nn.mxf
%deliverfolder%\ CARD_3\Clip0001....Clip00nn.mxf
if files (Clip0001....Clip00nn) in a root of %watchfolder% deliver them to a specified folder "OTHERS":
%watchfolder%\ files Clip0001....Clip00nn
%watchfolder%\ CARD_1\PRIVATE\XDROOT\Clip - Clip0001....Clip00nn.mxf
%watchfolder%\ CARD_2\PRIVATE\Clip - Clip0001....Clip00nn.mxf
%watchfolder%\ CARD_3\Clip - Clip0001....Clip00nn.mxf
%deliverfolder%\ OTHERS\Clip0001....Clip00nn
%deliverfolder%\ CARD_1\Clip0001....Clip00nn.mxf
%deliverfolder%\ CARD_2\Clip0001....Clip00nn.mxf
%deliverfolder%\ CARD_3\Clip0001....Clip00nn.mxf
Re: Deliver to the *first folder* after watchfolder
Oh i can thast make monitor only root %watchfolder% deliver all to subfolder "OTHERS" and than one more monitor all subfolders ^_^
Nope, bad idie. I cant modifay %watchfolder%
Nope, bad idie. I cant modifay %watchfolder%
Re: Deliver to the *first folder* after watchfolder
Sorry didnt understand why you would need to modify %watchfolder% for your 2 monitor approach.
Anyway, you could also use a conditional processor to check if %s_recursed_path% IS NOT (empty)... In that case, you connect 2 outputs on the conditional proc, one executes on success, the other one on error (right-click little green input box on the processor, set "on error")
Anyway, you could also use a conditional processor to check if %s_recursed_path% IS NOT (empty)... In that case, you connect 2 outputs on the conditional proc, one executes on success, the other one on error (right-click little green input box on the processor, set "on error")
emcodem, wrapping since 2009 you got the rhyme?
Re: Deliver to the *first folder* after watchfolder
I cant breack this *wall*, dont understend how correctly process separatly files from watchfolder root to OTHERS and subfolders as is in my example(CARD_1,2,3, etc).emcodem wrote: ↑Tue Mar 21, 2023 11:45 pm Sorry didnt understand why you would need to modify %watchfolder% for your 2 monitor approach.
Anyway, you could also use a conditional processor to check if %s_recursed_path% IS NOT (empty)... In that case, you connect 2 outputs on the conditional proc, one executes on success, the other one on error (right-click little green input box on the processor, set "on error")
My WF: