INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Auto-Renaming files based on Video FPS  (Read 874 times)

cvrkut

  • Recent member
  • *
  • Posts: 21
Auto-Renaming files based on Video FPS
« on: January 05, 2019, 12:16:48 am »

I would like to automatically rename files when I import them into the library. Append a "Video FPS" tag at the end of the filename.
For instance: Breath.2017.1080p.BluRay.x264-PFa.mkv -> Breath.2017.1080p.BluRay.x264-PFa.24,00.mkv

When I use [Filename] [FPS] template I get "Breath.2017.1080p.BluRay.x264-PFa.mkv.24,00.mkv"

How can I avoid double mkv? Is it possible to append the "Video FPS" tag at the end of the filename without extensions?
Is it possible to do this automatically or I must always use F6 and rename?

Regards
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Auto-Renaming files based on Video FPS
« Reply #1 on: January 05, 2019, 04:56:36 am »

https://wiki.jriver.com/index.php/File_Path_and_Identifier_Functions#FileName has a parameter to suppress the extension so use this instead of the filename value directly, there is no obvious way to get the extension though so I guess you'd need to do something like

Code: [Select]
=RemoveLeft(Filename([Filename]), Math(Length(Filename([Filename (name)],0))+1))

to give you the extension back

the Math bit is to remove the . so if you want to dot then just do

Code: [Select]
=RemoveLeft(Filename([Filename]), Length(Filename([Filename (name)],0)))
Logged

cvrkut

  • Recent member
  • *
  • Posts: 21
Re: Auto-Renaming files based on Video FPS
« Reply #2 on: January 05, 2019, 07:00:50 am »

https://wiki.jriver.com/index.php/File_Path_and_Identifier_Functions#FileName has a parameter to suppress the extension so use this instead of the filename value directly, there is no obvious way to get the extension though so I guess you'd need to do something like

Code: [Select]
=RemoveLeft(Filename([Filename]), Math(Length(Filename([Filename (name)],0))+1))

to give you the extension back

the Math bit is to remove the . so if you want to dot then just do

Code: [Select]
=RemoveLeft(Filename([Filename]), Length(Filename([Filename (name)],0)))


filename(, 0)

Thanks!
Logged
Pages: [1]   Go Up