Panasonic P2
-
- Posts: 20
- Joined: Mon Apr 19, 2021 3:47 pm
Panasonic P2
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-
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-
Re: Panasonic P2
Hey there,
welcome to the forum and thank you for using FFAStrans! Good to have you here
try %s_original_path~1%
https://ffastrans.com/wiki/doku.php?id= ... _variables
welcome to the forum and thank you for using FFAStrans! Good to have you here
try %s_original_path~1%
https://ffastrans.com/wiki/doku.php?id= ... _variables
emcodem, wrapping since 2009 you got the rhyme?
-
- Posts: 20
- Joined: Mon Apr 19, 2021 3:47 pm
Re: Panasonic P2
it won't help either. Already triedemcodem 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
try %s_original_path~1%
https://ffastrans.com/wiki/doku.php?id= ... _variables
Re: Panasonic P2
Hm should help... Whats the value of %s_original_path~1% in your Text file?
emcodem, wrapping since 2009 you got the rhyme?
-
- Posts: 20
- Joined: Mon Apr 19, 2021 3:47 pm
Re: Panasonic P2
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
Re: Panasonic P2
I understood that, no worries. Wanna know the returned value from %s_original_path~1%
emcodem, wrapping since 2009 you got the rhyme?
-
- Posts: 20
- Joined: Mon Apr 19, 2021 3:47 pm
Re: Panasonic P2
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
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
Re: Panasonic P2
Hehe my Bad :d
I'll Post some example for you later, Hard to Do on mobile
I'll Post some example for you later, Hard to Do on mobile
emcodem, wrapping since 2009 you got the rhyme?
-
- Posts: 20
- Joined: Mon Apr 19, 2021 3:47 pm
Re: Panasonic P2
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.
Re: Panasonic P2
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:
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.
...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
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\\.+?\\")
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\\")
A pro pos, ja, ich wäre auch lieber reich
emcodem, wrapping since 2009 you got the rhyme?