Panasonic P2

Use this forum to request features. Maybe you'll get lucky!
lieberreich
Posts: 20
Joined: Mon Apr 19, 2021 3:47 pm

Panasonic P2

Post by lieberreich »

Hi! I have some troubles with Panasonic P2 workflow. I'm trying to use command executor in order to delete original media (or whole CONTENTS folder) after compression, but all commands can return only path to XML file or folder name. I'll be gratefull if someone can help me to find a solution.

TXT Node
1-%s_original_drive%
2-%s_original_folder%
3-%s_original_full%
4-%s_original_path%
5-%s_original_root%
6-%s_pickup_file%
7-%s_recursed_path%

Result
1-D:
2-\!in\CONTENTS\CLIP
3-D:\!in\CONTENTS\CLIP\0006KN.XML
4-D:\!in\CONTENTS\CLIP
5-D:
6-D:\!in\CONTENTS\CLIP\0006KN.XML
7-
emcodem
Posts: 1815
Joined: Wed Sep 19, 2018 8:11 am

Re: Panasonic P2

Post by emcodem »

Hey there,
welcome to the forum and thank you for using FFAStrans! Good to have you here :D

try %s_original_path~1%

https://ffastrans.com/wiki/doku.php?id= ... _variables
emcodem, wrapping since 2009 you got the rhyme?
lieberreich
Posts: 20
Joined: Mon Apr 19, 2021 3:47 pm

Re: Panasonic P2

Post by lieberreich »

emcodem wrote: Mon Apr 19, 2021 4:13 pm Hey there,
welcome to the forum and thank you for using FFAStrans! Good to have you here :D

try %s_original_path~1%

https://ffastrans.com/wiki/doku.php?id= ... _variables
it won't help either. Already tried
emcodem
Posts: 1815
Joined: Wed Sep 19, 2018 8:11 am

Re: Panasonic P2

Post by emcodem »

Hm should help... Whats the value of %s_original_path~1% in your Text file?
emcodem, wrapping since 2009 you got the rhyme?
lieberreich
Posts: 20
Joined: Mon Apr 19, 2021 3:47 pm

Re: Panasonic P2

Post by lieberreich »

emcodem wrote: Mon Apr 19, 2021 4:30 pm Hm should help... Whats the value of %s_original_path~1% in your Text file?
There are no problems with txt. I need to compress a lot of P2 files and delete original media. workflow looks like p2->h264->folder->command executor. When im trying to use %comspec% /c"del /f /q "%s_original_full%"" it deletes only xml files, but i need some solution to get MXF through command executor
emcodem
Posts: 1815
Joined: Wed Sep 19, 2018 8:11 am

Re: Panasonic P2

Post by emcodem »

I understood that, no worries. Wanna know the returned value from %s_original_path~1%
emcodem, wrapping since 2009 you got the rhyme?
lieberreich
Posts: 20
Joined: Mon Apr 19, 2021 3:47 pm

Re: Panasonic P2

Post by lieberreich »

before %s_original_path~1%
4-D:\!in\CONTENTS\CLIP
after %s_original_path~1%
CLIP

I can use "path~n" to navigate backwards in folders, but can't use del function because it may still render other media in contents folder
path~n can return only a name of (~n back steps) folder
emcodem
Posts: 1815
Joined: Wed Sep 19, 2018 8:11 am

Re: Panasonic P2

Post by emcodem »

Hehe my Bad :d
I'll Post some example for you later, Hard to Do on mobile :D
emcodem, wrapping since 2009 you got the rhyme?
lieberreich
Posts: 20
Joined: Mon Apr 19, 2021 3:47 pm

Re: Panasonic P2

Post by lieberreich »

emcodem wrote: Mon Apr 19, 2021 4:53 pm Hehe my Bad :d
I'll Post some example for you later, Hard to Do on mobile :D
Thank you! Long story short - i just want to delete mxf related to xml after h.264 node in order to save space on hard drive. I dont care much about empty folders, because they can be deleted via timer at night for example.
emcodem
Posts: 1815
Joined: Wed Sep 19, 2018 8:11 am

Re: Panasonic P2

Post by emcodem »

Ok, so a little regex magic should help us here. There are 2 little problematic spots:
1) you need to "hardcode" your "base watchfolder" into the regex in the populate variables node, so the code is actually not 100% reuseable unfortunately, you cannot really use it for multiple watchfolders in the same workflow. If you want to do so, you'd need to at least guarantee that the number of folders in the watched directories is always the same. Like first watchfolder is on \\server\share\path, second on \\server\share2\anotherpath

2) when inserting your path into the regex, all backslashes must be doubled

So, to get out the "first folder" after your watchfolder, you can do like this:

Code: Select all

$regext("%s_source%","C:\\!in\\.+?\\")
Another option:
As should will always be a CONTENTS folders in P2, you could get it like this so you just always delete the CONTENTS folder, no matter in what subdir it is and you dont underly above mentioned restrictions.

Code: Select all

$regext("%s_source%",".+?CONTENTS\\")
...It depends a little on how exactly you expect the subfolder structure in c:\!in to look like.
A pro pos, ja, ich wäre auch lieber reich :D
emcodem, wrapping since 2009 you got the rhyme?
Post Reply