Page 1 of 1
Rename files after transcode
Posted: Wed Nov 20, 2019 6:26 pm
by VirtuWeb
I need to see if there is a way to rename a file after transcode with the original file name minus a specified character. For instance and original file will coming in at SPOT1234H.mpg I need to have it saved after it has been sent through the directed encoder to SPOT1234.mpg. I just need to drop the "H"
Hopefully this is possible.
Thanks
Re: Rename files after transcode
Posted: Wed Nov 20, 2019 7:34 pm
by emcodem
Hi VirtuWeb, welcome to the Forum and thanks for using ffastrans!
@momocampo ...any ideas?
Re: Rename files after transcode
Posted: Wed Nov 20, 2019 10:09 pm
by momocampo
Hello VirtuWeb,
VirtuWeb you have to know Encodem forces me to work with ReGex and I have to find a solution for you now
I think you have to populate a variable after the monitor folder and use this regex :
(\w+)(\d+)
It will filter your name and keep all characters before numbers(\w+) and keep the numbers(\d+). Sorry but I must admit I don't work my Regex since quiet long time so not sure it's ok...
So populate variable and use this : $regext("%s_original_name%","(\w+)(\d+)") and put this new variable in the delivery node instead of name.
Anyway, Encodem will tell us if I'm wrong (cause I'm really not sure of myself)
Cheers
B.
Re: Rename files after transcode
Posted: Thu Nov 21, 2019 7:53 am
by emcodem
momocampo wrote: ↑Wed Nov 20, 2019 10:09 pm
So populate variable and use this : $regext("%s_original_name%","(\w+)(\d+)") and put this new variable in the delivery node instead of name.
Thank you so much Benjamin ...i am so proud of you, the concept of the solution is perfect and definitely works for the provided example filename, well done!
Re: Rename files after transcode
Posted: Thu Nov 21, 2019 9:18 am
by momocampo
Hey !
Wouahh. So lucky I am
I really not practice these days and I begin to forgot...Not good.
Anyway, happy to know I'm right
Cheers.
B.
Re: Rename files after transcode
Posted: Thu Nov 21, 2019 11:04 am
by admin
@emcodem, @momocampo...