Is there a way to batch rename the filename?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Is there a way to batch rename the filename?

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

by SpritHansi » Sun Jun 14, 2009 3:08 am

Aah. I'll try that.
Sorry for my bad explanation ZvezdanD. But thanks for the help anyway :)

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

by ZvezdanD » Sun Jun 14, 2009 2:47 am

I am sorry, but I cannot read you mind. If you don't have a time to answer to all my questions, I could not help you.

If you want to change only Disc # tags, which allready contains data in form CDx, then simply enter CD as the Find what string and leave the Replace string empty. If you want Disc # tags with leading zero, just choose the "Add the leading zero to the single-digit Track number" preset and change the Into drop-down to Disc #. Understand????

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

by SpritHansi » Sun Jun 14, 2009 2:37 am

I want to modify the disc# tag from
CD1 -> 01
CD2 -> 02
CD3 -> 03

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

by ZvezdanD » Sun Jun 14, 2009 2:28 am

No, I don't understand. What you want to modify, path/filename or tags? If you want to modify filename and or folders, how they looks now and how do you want they should look after modification? How currently looks your Album and Disc # tags? Did you try the "Assign the Disc number from the part of the Album name" preset?

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

by SpritHansi » Sun Jun 14, 2009 2:20 am

If the album contains two or more discs, I have the disknumber in the filename.
<Artist> - <Album> CD1 - <Track#> - <Tittel>

But I want to tag the disc# (CD1) to 01, not CD1...
Understand???? :-?

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

by ZvezdanD » Sun Jun 14, 2009 2:12 am

SpritHansi wrote:If albumtag contains CD1, Disc# is 01. CD2=02......
Possible??
Yes, it is possible, but you should be more specific. Did you try the "Assign the Disc number from the part of the Album name" preset?

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

by SpritHansi » Sun Jun 14, 2009 12:13 am

Hello again!
Thanks for the scripts. Here's another wish;
If albumtag contains CD1, Disc# is 01. CD2=02......
Possible??

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

by ZvezdanD » Tue Jun 02, 2009 1:36 am

SpritHansi wrote:I wonder if this script can rename my files.
I suppose you are asking about RegExp Find & Replace script. Yes, it can rename files, but for such simple example like yours, it could be easier to use the Auto-Organize option. Anyway, if you are still interested, here are settings:
Find what:

Code: Select all

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

Code: Select all

"$1" & SDB.Tools.FileSystem.CorrectFilename(oSongData.ArtistName & " - " & oSongData.AlbumName) & " - $3"
VBScript expression: checked

The Replace with string could be simpler if you don't want to remove the "(Year)" part from the filename:

Code: Select all

"$1$2 - $3"

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

by SpritHansi » Mon Jun 01, 2009 6:00 pm

I wonder if this script can rename my files. I have the following structure:
Folder: Artist - Album (Year) or only
Artist - Album
Files: Track# - Tittel
And I want this filestructure: Artist - Album - Track# - Tittel

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

by ZvezdanD » Sun Apr 12, 2009 3:31 pm

I am not sure when I will finish with the next version of this script. If you are impatient and don't want to wait for it, you could try with the modification of the script by yourself. You should replace StoreIniValues function from the line 3175 till 3192 with the next code:

Code: Select all

Sub StoreIniValues(lIndex)
    SetIniPreset lIndex, "Name: " & AddQuotes(sPresetName) _
            & ", Description: " & AddQuotes(sPrstDscrpt) _
            & ", Shortcut: " & AddQuotes(sPrstShrcut) _
            & ", Icon: " & AddQuotes(IIf(Left(sIconIdx, _
                    Len(SDB.ApplicationPath)) = SDB.ApplicationPath, _
                    Mid(sIconIdx, Len(SDB.ApplicationPath) + 1), sIconIdx)) _
            & ", Toolbar: " & IIf(bToolbarBtn, "True", "False") _
            & ", FindWhat: " & AddQuotes(sFindText) _
            & ", FindInto: " & AddQuotes(cboFindInto.ItemText(lFindIndex)) _
            & ", FindRegExp: " & IIf(bFindRegEx, "True", "False") _
            & ", WholeWord: " & IIf(bWholeWord, "True", "False") _
            & ", ReplaceWith: " & AddQuotes(sRplcText) _
            & ", ReplaceFrom: " & AddQuotes(cboRplcFrom.ItemText(lRplcIndex)) _
            & ", ReplaceRegExp: " & IIf(bRplcRegEx, "True", "False") _
            & ", ReplaceVBScr: " & IIf(bRplcVBScr, "True", "False") _
            & ", MatchCase: " & IIf(bMatchCase, "True", "False")
End Sub

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

by okram » Sun Apr 12, 2009 2:16 pm

Thank you Zvezdan for such a fast support - do you sleep at all?
Sve najbolje i tebi!!!

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

by ZvezdanD » Sun Apr 12, 2009 2:06 pm

Thank you very much for the report and your involvement in this. We finally discovered where is a bug. As you supposed, it is because you have localized version of Windows. Because of that instead of the word "True" in the .ini file you have "Resnično" after you save some new preset. This bug will be removed in the next version of the script.

Puno pozdrava komšija i mnogo ti hvala na pomoći!!! :D

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

by okram » Sun Apr 12, 2009 1:31 pm

you have PM. After looking into the files, maybe language version of Vista could cause troubles...

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

by ZvezdanD » Sun Apr 12, 2009 6:40 am

Guest wrote:I have made some additonal tests and I think the basic issue is that all original presets called as 0/101 have all check boxes unchecked (Regular Expression 1 and 2, Find whole words only, VBScript expression, Match case, Backward direction).
Thanks for informing me about your tests. Unfortunately, I really have not any idea what is happening. Many (almost all) predefined presets have turned on some option and in same way corresponding check box should be checked when you choose that preset. You could open the RegExp Export/Import dialog box and see such options, for example the second preset "Replace acute/grave accent..." have "FindRegExp: True" which means that you should get checked the Regular expression 1 check box if you choose such preset. Whenever there is ": True", such option should check corresponding check box.

If you want to help me to resolve that bug, please register in this forum and send me PM with your MediaMonkey.ini file (it is located in the c:\Documents and Settings\your_name\Local Settings\Application Data\MediaMonkey\ folder if you have XP). If it is too large to be posted, please split it up to several parts or upload it to some free public file server as http://www.yousendit.com (before that I need to tell you my e-mail address in PM).

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

by Guest » Sun Apr 12, 2009 4:46 am

Zvezdan, I have installed the latest beta version and the result is the same. I have made some additonal tests and I think the basic issue is that all original presets called as 0/101 have all check boxes unchecked (Regular Expression 1 and 2, Find whole words only, VBScript expression, Match case, Backward direction).

Top