Page 1 of 2

Renaming a file based on extended properties

Posted: 09 Sep 2010 19:48
by acheton
Hi there,

I have a whole bunch of mp3 files which I want to change the names of to "title" property of the mp3. I've tried the MP3 special rename and searched the forum but I can't find an obvious way of achieving this. There are some threads but they don't seem to help. Can any one help?

thanks,


Paul

Re: Renaming a file based on extended properties

Posted: 09 Sep 2010 19:55
by admin
You can tweak the entries in INI section [ID3toFilename]: for example this will make the first item in MP3 special rename to use just the title:
1=Title
2=Track - Artist - Title
3=Artist - Album - Track - Title

Re: Renaming a file based on extended properties

Posted: 09 Sep 2010 20:37
by Stefan
I had just thought i could use property() for this issue

For Each Item In Items
    $p = property(#10);
    rename, $p, , Item;



but your solution is better for the user.

---

While testing with property() i found out that "named" parameter didn't work always.

The tool tip shows an value for "Titel" but
::$p = property("titel"); rename, $p, p;
doesn't works.
Instead this works.
::$p = property(#10); rename, $p, p;


Works
::msg property(#2);
Doesn't works
::msg property("Typ");

This works too
::$p = property("artist"); rename, $p, p;

Here on german XP SP2. The ToolTip shows all properties.
Known limitation by the OS or...?

Re: Renaming a file based on extended properties

Posted: 09 Sep 2010 21:11
by admin
I think you should pass English words in property, e.g. property("type")...

Re: Renaming a file based on extended properties

Posted: 09 Sep 2010 22:20
by acheton
admin wrote:You can tweak the entries in INI section [ID3toFilename]: for example this will make the first item in MP3 special rename to use just the title:
1=Title
2=Track - Artist - Title
3=Artist - Album - Track - Title
Thanks for the help, I have tweaked this however it doesn't seem to work. I have changed the first option to 1=Title as suggested and right-clicked on a file (with a title) and chosen Rename Special but nothing happens! The file retains its original name - I am running the latest beta 9.50.0001. Any ideas what I might be doing wrong?

Re: Renaming a file based on extended properties

Posted: 09 Sep 2010 22:49
by Stefan
acheton wrote: I have tweaked this however it doesn't seem to work. I have changed the first option to 1=Title [...] Any ideas what I might be doing wrong?
Just an question: Did you "restart XYplorer without saving"?

I mean did you something like that:

- If you want/need do an "File > Settings > Save all settings" first

then do
- "Tools > Open Configuration file..."
- do the modification/tweak
- save the file
- "File > Restart without saving"

Re: Renaming a file based on extended properties

Posted: 09 Sep 2010 22:56
by acheton
I exited XYplorer. Opened the ini file in notepad, made the edit and restarted XYplorer. I think that should have worked.

Re: Renaming a file based on extended properties

Posted: 10 Sep 2010 08:12
by Stefan
acheton wrote:I exited XYplorer. Opened the ini file in notepad, made the edit and restarted XYplorer. I think that should have worked.
Yes this is an another good way and works too.

I have tested this with 9.50.0001 on english(MUI set to German) XP SP3 without success too.

Code: Select all

[FilenameToID3]
; Tweak: change the order of fields as you like
1=Artist - Title
2=Track - Artist - Title
3=Artist - Album - Track - Title

[ID3toFilename]
; Tweak: idem
1=Title
2=Track - Artist - Title
3=Artist - Album - Track - Title
Sub menu "Mp3 Special" says: "ID3 Tag to Filename (Title.mp3)"

Rename Preview says: "Rename Special: ID3 Tag to Filename (Title.mp3)"
But New Name says: "<Unchanged> OldArtist - OldTitle.mp3"
So the [Rename Now]-button does nothing.

BTW: i have disabled the Preview panel for this test.

Re: Renaming a file based on extended properties

Posted: 10 Sep 2010 09:11
by acheton
Stefan wrote:I have tested this with 9.50.0001 on english(MUI set to German) XP SP3 without success too.
Thanks for confirming the issue Stefan - for the record I am running Win 7 x64.

Re: Renaming a file based on extended properties

Posted: 10 Sep 2010 10:00
by admin
There is indeed a bug: MP3 special rename ID3 tag to filename does currently only happen when the ID3 tag has an Artist entry. Next version will work better.

@acheton: Can this explain why it dod not work at your place?

Re: Renaming a file based on extended properties

Posted: 10 Sep 2010 10:09
by acheton
admin wrote:@acheton: Can this explain why it dod not work at your place?
Well as an example one of the mp3's I am renaming has a contributing artist but not an album artist - which from your comment above should fail I think. I've attached an example so you can see what I am working with...

Re: Renaming a file based on extended properties

Posted: 10 Sep 2010 10:16
by admin
Yes, should work in next beta.

Re: Renaming a file based on extended properties

Posted: 10 Sep 2010 10:23
by acheton
admin wrote:Yes, should work in next beta.
Thanks Don.

Re: Renaming a file based on extended properties

Posted: 14 Sep 2010 08:04
by Stefan
JustFYI

Code: Select all

v9.50.0002 - 2010-09-12 18:53
    ! Rename Special | Mp3 Special: "ID3 Tag to Filename" would only
      happen when the file's ID3 tag had an Artist entry. Fixed.
Seams to work.
- i have renamed the song title at the file name to nonsense
- i used "Rename Special > MP3 > ID3 Tage to File name (Title.mp3)"
- the preview looks OK as expected with correct title only, read from tag.

Re: Renaming a file based on extended properties

Posted: 14 Sep 2010 14:22
by acheton
I've tested this with 9.50.0003 and whilst it seems to work fine with mp3 files I cannot seem to get this working with MP4 files. I know that it is an MP3 renamer but is there a way of extending the list of file extensions which this feature will work on?