Rename files after transcode

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

Rename files after transcode

Post by VirtuWeb » Wed Nov 20, 2019 6:26 pm

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: 445
Joined: Wed Sep 19, 2018 8:11 am

Re: Rename files after transcode

Post by emcodem » Wed Nov 20, 2019 7:34 pm

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

@momocampo ...any ideas? :D

momocampo
Posts: 387
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Rename files after transcode

Post by momocampo » Wed Nov 20, 2019 10:09 pm

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: 445
Joined: Wed Sep 19, 2018 8:11 am

Re: Rename files after transcode

Post by emcodem » Thu Nov 21, 2019 7:53 am

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!

momocampo
Posts: 387
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Rename files after transcode

Post by momocampo » Thu Nov 21, 2019 9:18 am

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: 1303
Joined: Sat Feb 08, 2014 10:39 pm

Re: Rename files after transcode

Post by admin » Thu Nov 21, 2019 11:04 am

@emcodem, @momocampo... :lol:

Post Reply