Help - Search - Members - Calendar
Full Version: renaming according to playlist order
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
carpman
Hi -- I'm looking for a way to rename files in Foobar where the filename reflects its position in the playlist, preferably with a count prefix inserted before the original filename:

So:

"track1intheplaylist.mp3" becomes: "001_track1intheplaylist.mp3"
"track13intheplaylist.mp3" becomes: "013_track13intheplaylist.mp3"

etc.

Searched the forum but only found stuff re. getting filename from count tags rather than playlist position.

Any help much appreciated.

Thanks

C.





Nemphael
Use the variable %list_index%.
carpman
%list_index%_%filename% does the trick. And I see that the list index function automatically provides the necessary zeros (i.e. if you have 1000 tracks no.1 = 0001).

Thanks Nemphael - it's a simple thing - but you've saved me lots of time.

carpman
QUOTE(Nemphael @ Oct 17 2007, 22:54) *

Use the variable %list_index%.


Ah -- I've a problem -- I don't think I was clear enough in my initial post:

%list_index% only keeps to playlist order if the files are in alphanumeric order already. I tested it with:

A.mp3, B.mp3, C.mp3

The playlist order was:

B.mp3
A.mp3
C.mp3

Yet %list_index%_%filename% outputed:

1_A.mp3
2_B.mp3
3_C.mp3


What I'm after is:

1_B.mp3
2_A.mp3
3_C.mp3

Thus, in effect maintaining the Playlist Order even when Windows Explorer or a DVD player automatically sorts alphanumerically.

Am I doing something wrong or is there a bit more to what I'm after?

Thanks again - really appreciate the help.

C.



carpman
Got the answer from herefornow and thought I'd share it here in case someone else needs to do a similar thing:

PLAYLIST FILE RENUMBERING TO PRESERVE PLAYLIST TRACK ORDER AMONG STANDALONE FILES

herefornow's instructions:
(have made a minor edit at 14)

in Foobar2000

1-arrange files in desired order
2-select all
3-right click, pick tagging, manage scripts
4-click add, format value from other fields
5-Destination field name: pick an unused field, or make one up(used the "comment" field for this example)
6-Formatting pattern: %tracknumber%
7-click ok
8-click add, Auto tracknumber
9-click run
10-right click, file operations, rename
11-output filename, edit
12-add
13-display name: type a name you desire(ex: playlist renumber)
14-Format: %comment%_%filename%
15-click ok, ok
16-Output filename: pick whatever you named this (ex: playlist renumber)
17-click run

Thanks to all who helped out

Carpman
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.