Help Please

Hi there,

I am new to all of this and i am trying to get my head round it.

I want to replace the filename Mr.and.Mrs.Smith.2005.BluRay.1080p.x264.YIFY.mp4 to Mr and Mrs Smith.mp4 and set the title as that.

Many thanks for any help :slight_smile:

Lee

I could think of a rather complicated construction for convert Filename-Filename.
But if you only want to get the title and then rename the file, it is much easier, if you simply type in the title (in the tag panel and press Save or the files list column).
Then use the function Convert>Tag-Filename and enter as string:
%title%

Make sure you select all the files you want to do this with. Either edit and select all or ctrl, left click and drag cursor across files. I like using the edit button myself but makes no never mind either way. :music:

Just a word of warning: my advice only works for the specified file as the OP did not supply a list of files to make out a certain pattern.
So selecting more than just the file the OP mentioned would create a number of files with the same title and probably several errors during the attempt to rename them as filenames have to be unique.
But perhaps the OP tells us if he wants to stay with this single file or has a whole list in mind.

I have a bunch of films (400odd) in the same name format, id rather not have to manually type it all in

Assumingly you have not only this one file but many files to work with ...
so please tell us how to divide the filename string into what logical parts (pattern).

Do you want only to set the filename?
Do you want to create and fill tag fields by parts of the filename?

What meaning has what part?

Mr.and.Mrs.Smith|2005|BluRay|1080p|x264|YIFY|.mp4

Title|Year|???|???|???|???|FilenameExtension

And ... is this pattern valid for all files?

DD.20131024.1856.CEST

OK.
So
Mr.and.Mrs.Smith.2005.BluRay.1080p.x264.YIFY.mp4
Looks to me as though you have a part before the word Bluray and a part behind it.
So, use the function Convert> filename - tag and enter as source mask:
%title%.%year%.BluRay.%dummy%
The preview should show
TITLE: Mr.and.Mrs.Smith
YEAR: 2005
This should fill the field TITLE with Mr.and.Mrs.Smith and the field YEAR with 2005.
Now execute an Action (Quick) -> see toolbar for that -> of the type "Replace".
Select TITLE as field.
Enter as search string: .
Enter as Replace string: " "
(without the inverted commas, so just a blank).
This should transform Mr.and.Mrs.Smith to " Mr and Mrs Smith".

Finally use the function Convert > Tag-Filename and enter as mask:
%title%

Hi, many thanks for the help, i tried what you mentioned and this is the preview just using %title%.%year%.BluRay.%dummy%

"D:\Videos\Mr.and.Mrs.Smith.2005.BluRay.1080p.x264.YIFY.mp4" ->
title: Mr
year: and.Mrs.Smith.2005

Any suggestions?

Hi, every movie is in the same format:
i'm not interested in any part after the year other than the .mp4

the basis of all this is i am writing an imdb lookup source from the filename or title, but i don't really want to type every title in to do the search.

Lee

Then use:
%title%.2%year%.BluRay.%dummy%

cuts off a little from the year ... I am never quite sure where the "greadiness" of the expressions set in.

There are several ways to solve this task within Mp3tag.
Here is one way which makes use of the converter "Tag - Tag" and some scripting functions.

Filename: Mr.and.Mrs.Smith.2005.BluRay.1080p.x264.YIFY.mp4

1. Set tag field TITLE

Convert | Tag - Tag | ALT+5
Field:
TITLE
Format string:

$replace($reverse($regexp($reverse(%_filename%),'^(.+?)\.(.+?)\.(.+?)\.(.+?)\.(.+?)\.(.+?)$','$6')),'.',' ')

Preview
Mr and Mrs Smith

2. Set tag field YEAR

Convert | Tag - Tag | ALT+5
Field:
YEAR
Format string:

$reverse($regexp($reverse(%_filename%),'^(.+?)\.(.+?)\.(.+?)\.(.+?)\.(.+?)\.(.+?)$','$5'))

Preview
2005

3. Set filename from tag field TITLE

Convert | Tag - Tag | ALT+5
Field:
_FILENAME

Format string:
%TITLE%

Preview
Mr and Mrs Smith

DD.20131024.2130.CEST

Awesome, works perfect :slight_smile:
I dont mean to be cheeky, but, is there a way i can set that in an action?

I have looked around the site but can't find any real documentation on it?
could you please explain this to me?

[#0] (i assume these are the order?)
T=2 (not got a scooby about this)
F=ARTIST (i assume this is the field/variable?)
1=; (replace this)
2=/ (with this?)
3=0|0 (????)

then i assume [#1] would run?

@ohrenkino, thanks for your help too, i really appreciate any and all contribution :slight_smile:

Many thanks, Lee.

Yes you can.

Begin Action Group Test_2013#20131025.LeeMorgan

Action #1
Actiontype 5: Format value
Field ______: TITLE
Formatstring: $replace($reverse($regexp($reverse(%_filename%),'^(.+?).(.+?).(.+?).(.+?).(.+?).(.+?)$','$6')),'.',' ')

Action #2
Actiontype 5: Format value
Field ______: YEAR
Formatstring: $reverse($regexp($reverse(%_filename%),'^(.+?).(.+?).(.+?).(.+?).(.+?).(.+?)$','$5'))

Action #3
Actiontype 5: Format value
Field ______: _FILENAME
Formatstring: %TITLE%

End Action Group Test_2013#20131025.LeeMorgan (3 Actions)

There is no need to look into or manipulate a Mp3tag MTA file directly.

DD.20131025.0929.CEST

Hi DetlevD,

You are a star!!! :smiley:

Created the action group, and i then read the mta directly, i understand it all now

Many Thanks
Lee