Is there a way to batch rename the filename?

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Is there a way to batch rename the filename?

Post by steviegt »

Is there a way to batch rename the filename using the tag info and customize the fields used? Auto-Tag from tag info to filename.

I looked at the Extract field script but I don't understand how to use it for this purpose.

Also, the Extract fields script doesn't show ups as "Extract Fields", it's named "Change tags based on existing tags". Is that the way it should be? It also does not show up in the menu icon for the list of scripts. There is only it's own individual icon. Is that correct?

Has anyone looked at Mp3tag and it's functionality? I really like that program and find myself falling back to it when I can't figure things out in MM? It's freeware. Maybe could be incorporated with MM somehow?
Last edited by steviegt on Tue Apr 07, 2009 9:07 am, edited 1 time in total.
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
ZvezdanD
Posts: 3157
Joined: Thu Jun 08, 2006 7:40 pm

Re: Is there a way to batch rename the filename?

Post by ZvezdanD »

First, you could try MM built-in option Auto-Organize Files. I don't know about ExtractFields, but you could use RegExp Find & Replace script for this - it has several already predefined presets for such thing and if you want something specific, I could tell you what settings you should enter. It is even more powerful than Auto-Organize since it supports Regular expressions and VBScript expressions with full database access. For example, with RegExp you could assign weighted average Bitrate of the album to all its tracks/files - I don't think you could do that with Auto-Organize.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

Thank you. I will install and try it out.
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

I am starting to believe that if I didn't have bad luck, I wouldn't have any luck at all.

I downloaded and unpacked the RegExp Find & Replace script. When I try to evecute the install.vbs I get a script error.

http://img141.imageshack.us/my.php?imag ... script.jpg

Please advise.
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
ZvezdanD
Posts: 3157
Joined: Thu Jun 08, 2006 7:40 pm

Re: Is there a way to batch rename the filename?

Post by ZvezdanD »

It seems that you have a problem with the Windows scripting engine. There is a sticky thread in this forum about it. But, why you tried to unpack and execute install.vbs? You just need to double-click on the downloaded .mmip file. If your Web browser mistakenly renamed its extension from .mmip to .zip, you should rename it back to .mmip (this is already reported issue with some IE versions).
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

Of course that was it. I renamed the zip file it it installed okay. Thanks. :oops: again.
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

it has several already predefined presets for such thing and if you want something specific, I could tell you what settings you should enter.
Wow...first thing OMG! 101 options. I looked thru them all and I can't believe it but I didn't see one that fits what I want to do. One of your previous posts offered to advise me on settings to enter. I need that help please.

When installed, 4 items were added to the search icon/toolbar. 3 of them I'd like to remove. 1. Increment Play 2. Decrement Play. They are not icons, they are fully spelled out words. And 3. A lightbulb that when clicked shows all 101 presets. How do I remove these? (I have removed the checkmark from Options>>RegExp Find and Replace>>Shoe the toolbar button for the last executed preset. No thing that I've mentioned disappears. All remains the same)

Thank you.
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
ZvezdanD
Posts: 3157
Joined: Thu Jun 08, 2006 7:40 pm

Re: Is there a way to batch rename the filename?

Post by ZvezdanD »

You should be specific what you want. For example, you should specify what format of filename and or path you want go get.

If you choose some of presets which has a connection with the Path field, you could see that all of them have "(.+?)\\(.+)\\([^\\]+)\.([^\.\\]+)$" as the Find what string. Tokens used in Replace with string are: $1 = drive, $2 = folder, $3 = filename, $4 = extension. However, for such kind of manipulation, in most cases you should check VBScript expression checkbox and use VBScript syntax. So, instead of fields used in Auto-Organize like <Artist>, you should specify oSongData.ArtistName and so on.

There is already an answer for you question about toolbar buttons for Inc/Dec playcount presets in the RegExp thread (http://www.mediamonkey.com/forum/viewto ... 51#p184251). However, the bulb icon with the dropdown list of presets cannot be switched of in this moment, but I am thinking to add such possibility. The mention option from the Options dialog box is only for the new toolbar button which is not visible until you execute some preset from the dropdown list.

By the way, 101 are just examples. It has almost unlimited possibility, if you know how to use it ;)
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

Thanks so much. I think I will be using this script quite a bit. I appreciate all the tips. I removed thise items from the toolbar. That was simple. :D
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
ZvezdanD
Posts: 3157
Joined: Thu Jun 08, 2006 7:40 pm

Re: Is there a way to batch rename the filename?

Post by ZvezdanD »

If you don't know how to write VBScript/Regular expressions and if you have some specific folder/filename format in mind, you could tell me and I will write settings for it.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

No I don't know how to write VBScript/Regular expressions. What I need is something like:

C:\Users\Steve\Music\Chicago - The Best Of Chicago 40th Anniversary Edition [Disc 1] - 10 - (I've Been) Searchin' So Long.mp3

Is this what you meant?
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
ZvezdanD
Posts: 3157
Joined: Thu Jun 08, 2006 7:40 pm

Re: Is there a way to batch rename the filename?

Post by ZvezdanD »

Yes, this is what I mean. Here are settings for it:
Find what:

Code: Select all

(.+?)\\(.+)\\([^\\]+)\.([^\.\\]+)$
Into: Path
Regular expression 1: checked
Replace with:

Code: Select all

"C:\Users\Steve\Music\" & SDB.Tools.FileSystem.CorrectFilename(oSongData.ArtistName & " - " & oSongData.AlbumName & IIf(Len(oSongData.DiscNumberStr) > 0, " [Disc " & oSongData.DiscNumberStr & "]", "") & " - " & oSongData.TrackOrderStr & " - " & oSongData.Title) & ".$4"
VBScript expression: checked

There is not almost any checking of fields existence, except for the Disc number field. If you want to apply it to all tracks and you don't want to worry if some field is empty, you should tell me and I could modify it to cover such situations. In fact, a logic is similar with the Disc number field which is checked using IIf and Len functions.

However, I think it is easier to use Auto-Organize option for such simple filename formats.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

Fantastic. Thank you. Much appreciated!
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
steviegt
Posts: 311
Joined: Tue Mar 17, 2009 8:39 am

Re: Is there a way to batch rename the filename?

Post by steviegt »

Works great. One question. Is there a way to get the track # in 2 digit format. ex 01, 02 03 etc?
MMW Gold Lifetime v4.1.21.11875
MM Pro Android v1.3.2.0824
Windows Home 10.0.17134.228 64-bit Build 1803
MS Edge


Next to MediaMonkey, the best program available: Total Commander http://www.ghisler.com/

"Being mean to someone takes more effort than being nice to them"
ZvezdanD
Posts: 3157
Joined: Thu Jun 08, 2006 7:40 pm

Re: Is there a way to batch rename the filename?

Post by ZvezdanD »

Of course. Instead of oSongData.TrackOrderStr, you should write Right("0" & oSongData.TrackOrderStr, 2). So, the previous example would be:
Replace with:

Code: Select all

"C:\Users\Steve\Music\" & SDB.Tools.FileSystem.CorrectFilename(oSongData.ArtistName & " - " & oSongData.AlbumName & IIf(Len(oSongData.DiscNumberStr) > 0, " [Disc " & oSongData.DiscNumberStr & "]", "") & " - " & Right("0" & oSongData.TrackOrderStr, 2) & " - " & oSongData.Title) & ".$4"
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Post Reply