Page 1 of 1

Can MM sort filenames like this?

Posted: Mon May 18, 2009 2:04 am
by ssurf
I have a folder where the files are named 1a1, 1a2 and so on up till 1a120. When I sort by file name in MM it will sort like this 1a1, 1a10, 1a11.......1a19, 1a2, 1a20......Is there a way to make it 1a1, 1a2, 1a3.......1a9, 1a10, 1a11 You get the idea? Or is this a Windows issue?

I would like to avoid renaming the files 1a01, 1a02, and so on, since I have thousands of these files, and their file names are the same as certain marker
names inside a DAW application.

Re: Can MM sort filenames like this?

Posted: Mon May 18, 2009 11:57 am
by rovingcowboy
there is a script to add zero/s to the front of the number of the songs in the list check in the scripts forum on the all scripts list and see if that will help you. 8)

Re: Can MM sort filenames like this?

Posted: Tue May 19, 2009 2:15 am
by ssurf
That's what I was hoping to avoid (see above). But maybe it's the only solution.

Re: Can MM sort filenames like this?

Posted: Wed May 20, 2009 10:11 pm
by Lowlander
MediaMonkey doesn't have smart sort like Windows Explorer. This means that the only solution is adding leading 0's to get the correct sort order.

Re: Can MM sort filenames like this?

Posted: Thu May 21, 2009 4:31 pm
by ssurf
Ok guess it's renaming time :-?

Re: Can MM sort filenames like this?

Posted: Thu May 21, 2009 6:17 pm
by onenonymous
one thought - copy the names into one of the custom fields with the fix to add the leading zeros. If they're all 1Annn then you could strip off the '1A' part when you copy it into the custom field. Then all you have to do is sort on the custom field. You should be able to use the RegExp script to do this I think.

Re: Can MM sort filenames like this?

Posted: Sat May 23, 2009 8:11 pm
by ZvezdanD
You don't need to add zeroes, nor I suggest to copy filenames to some custom field. It would be the best if you parse filename and put numbers which are after "1a" directly to the Track Number field. I don't know if it could be done with the Auto-Tag from Filename, but you could use the RegExp Find & Replace script with following settings:
Find what:

Code: Select all

^.*
Into: Track #
Regular Expression 1: checked
Replace with:

Code: Select all

IIf(Len(RegExpEx(oSongData.Path, "\\1a(\d+)\.[^\.\\]+?$", 0, 0)) > 0, RegExpEx(oSongData.Path, "\\1a(\d+)\.[^\.\\]+?$", 0, 0), "$&")
VBScript expression: checked

Re: Can MM sort filenames like this?

Posted: Tue May 26, 2009 1:53 am
by ssurf
Hmmm, will have to be careful with this one since the files also are present inside a DAW app. with markes named like the files. Think this will have to be done manually.

Re: Can MM sort filenames like this?

Posted: Tue May 26, 2009 9:49 am
by ZvezdanD
Why do you need to do that manually, is there some special reason? I suggested to enter your numbers into the Track Number field of MM and eventually to store that information in the .mp3 tag (if you turned on the Update tags when editing properties in the Options dialog box). I didn't suggest to change their filenames. I suppose your DAW needs that marker names match corresponding filenames, not Track numbers. However, if you prefer to change filenames instead, RegExp could be used for that as well (with another settings, of course).

Re: Can MM sort filenames like this?

Posted: Wed May 27, 2009 1:28 am
by ssurf
Yeah I want to change the file names. Will probably use regexp. Just worried that my DAW won't find the newly renamed wav files when I open the project (they are on a time line) I'd most likely have to locate them manually. In other words I'm considering just leaving the files the way they are as it is not a huge problem.