Author Topic: Part of filename to tag  (Read 1705 times)

Ooteboe

  • Jr. Member
  • *
  • Posts: 54
Part of filename to tag
« on: December 17, 2016, 12:33:30 PM »
I'm experimenting with metadata-templates. I want to copy a part of the filename into a tag. I've found elsewhere: {File.Name|to_upper}. That's the complete filename. But I want to copy only the first 10 characters into the metadata. Is that possible?

Thanks, Hans

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 29729
Re: Part of filename to tag
« Reply #1 on: December 17, 2016, 12:44:42 PM »
You can use the substr Variable formatting function, like

{File.Name|substr:0,3}

Please see the help topics on Variables in the IMatch Help system for all available formatting functions, examples on how to use them etc.

Tip: Use the VarToy app in the App Panel to try out your variables.
« Last Edit: December 17, 2016, 12:46:46 PM by Mario »

Ooteboe

  • Jr. Member
  • *
  • Posts: 54
Re: Part of filename to tag
« Reply #2 on: December 17, 2016, 01:54:55 PM »
Just what I needed! Thank you! Hans