INTERACT FORUM

More => Old Versions => Media Center 16 (Development Ended) => Topic started by: Magic_Randy on March 05, 2011, 03:15:03 pm

Title: Tagging: Set the image name = to filename (name) without file extention
Post by: Magic_Randy on March 05, 2011, 03:15:03 pm
Is there a simple way to set the name tag for my images to the filename without the file extension?

I know I can use the move/copy function to set the name = filename (name), but that brings the file extension as well.
Title: Re: Tagging: Set the image name = to filename (name) without file extention
Post by: Lasse_Lus on March 05, 2011, 03:30:17 pm
Will this do ?

Quote
if(IsRange(Length([File Type]),3-3), RemoveRight([Filename (name)],4),if(IsRange(Length([File Type]),4-4), RemoveRight([Filename (name)],5),if(IsRange(Length([File Type]),5-5), RemoveRight([Filename (name)],6),if(IsRange(Length([File Type]),6-6), RemoveRight([Filename (name)],7),if(IsRange(Length([File Type]),7-7), RemoveRight([Filename (name)],8),if(IsRange(Length([File Type]),8-8), RemoveRight([Filename (name)],9),if(IsRange(Length([File Type]),9-9), RemoveRight([Filename (name)],10),if(IsRange(Length([File Type]),10-10), RemoveRight([Filename (name)],11),if(IsRange(Length([File Type]),11-11), RemoveRight([Filename (name)],12),if(IsRange(Length([File Type]),12-12), RemoveRight([Filename (name)],13),!!!! CHECK THIS)
Title: Re: Tagging: Set the image name = to filename (name) without file extention
Post by: rick.ca on March 05, 2011, 04:04:11 pm
...or:

RemoveRight([Filename (name)], Math(Length(ListItem([Filename (name)], Math(ListCount([Filename (name)],.)-1),.))+1))

But—unless it's been changed since the files were imported—just use [Name]. ;)
Title: Re: Tagging: Set the image name = to filename (name) without file extention
Post by: Magic_Randy on March 05, 2011, 04:38:06 pm
So how do I use these formulas? Do I have to build a smartlist and then plug this into some set command or something?
Title: Re: Tagging: Set the image name = to filename (name) without file extention
Post by: Alex B on March 05, 2011, 05:15:32 pm
Library Tools > Fill Properties From Filename...

Filename: [Name]

The filename extension will not be included.
Title: Re: Tagging: Set the image name = to filename (name) without file extention
Post by: rick.ca on March 05, 2011, 05:22:31 pm
Quote
So how do I use these formulas?

Use them however you like. Likely choices would be in an edit operation (precede the expression with "=") to update [Name], in a custom expression field or to set a caption (in Options).

Title: Re: Tagging: Set the image name = to filename (name) without file extention
Post by: Magic_Randy on March 05, 2011, 05:44:45 pm
Thanks everyone for the help.

Being lazy like I am, I used Alex B's solution. :)