Rename files after transcode

Questions and answers on how to get the most out of FFAStrans
Post Reply
VirtuWeb
Posts: 5
Joined: Mon May 13, 2019 10:23 pm

Rename files after transcode

Post 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
emcodem
Posts: 1645
Joined: Wed Sep 19, 2018 8:11 am

Re: Rename files after transcode

Post by emcodem »

Hi VirtuWeb, welcome to the Forum and thanks for using ffastrans!

@momocampo ...any ideas? :D
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 592
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Rename files after transcode

Post 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.
emcodem
Posts: 1645
Joined: Wed Sep 19, 2018 8:11 am

Re: Rename files after transcode

Post 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!
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 592
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Rename files after transcode

Post 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.
admin
Site Admin
Posts: 1659
Joined: Sat Feb 08, 2014 10:39 pm

Re: Rename files after transcode

Post by admin »

@emcodem, @momocampo... :lol:
Post Reply