HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: carpman on 2007-10-18 10:41:34

Title: looking for file renamer to keep playlist order
Post by: carpman on 2007-10-18 10:41:34
Hi --- I'm looking for freeware that can rename audio files (insert a count prefix) based on the order the files appear in a playlist. I use foobar and recently asked in the foobar forum, they suggested using the rename function with %list_index%_%filename% however the problem was as follows:

3 files in playlist: A.mp3, B.mp3, and C.mp3

The playlist order is:

B.mp3
A.mp3
C.mp3

%list_index%_%filename% outputs:

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

However, 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.

Does anyone know if there's any software out there than can do this. Or if foobar can, does anyone know how?

Any help greatly appreciated.
Title: looking for file renamer to keep playlist order
Post by: odyssey on 2007-10-18 11:56:26
Ïn foobar you can mark the files that are in order, rightclick properties, rightclick and assign tracknumbers. Then you could rename the files according to the tracknumber.
Title: looking for file renamer to keep playlist order
Post by: kanak on 2007-10-18 14:24:36
Hi --- I'm looking for freeware that can rename audio files (insert a count prefix) based on the order the files appear in a playlist. I use foobar and recently asked in the foobar forum, they suggested using the rename function with %list_index%_%filename% however the problem was as follows:


foo_sendtodevice was built to overcome THIS very limitation of foobar. Instead of sending it to a "device", tell it to send files to a folder. You should be all set.
Title: looking for file renamer to keep playlist order
Post by: carpman on 2007-10-18 15:53:36
foo_sendtodevice was built to overcome THIS very limitation of foobar. Instead of sending it to a "device", tell it to send files to a folder. You should be all set.


Thanks for the replies ! I feel this has to be the right direction. Though I couldn't get it to do what I wanted.
Perhaps I'm missing something.  I don't see how foo_sendtodevice appends the numerical playlist position to the filename.

This is the test I just ran:

The list below in parenthesis is the output from using foobar's "Copy Names" function from 5 test files in a foobar playlist (note "Copy Names" actually appends the playlist track number (i.e. not from the files' tags - the test files don't have track numbers in their tags -- so it looks like foobar is capable of doing it):

"1. Test Artist N - [Now That's What I Call Testing 66] Track Z"    (this is the filename: song_z.mp3)
"2. Test Artist A - [Now That's What I Call Testing 55] Track X"    (song_x.mp3)
"3. Test Artist D - [Now That's What I Call Testing 11] Track Y"    (song_y.mp3)
"4. Test Artist F - [Now That's What I Call Testing 51] Track YZ1"  (song_yz1.mp3)
"5. Test Artist B - [Now That's What I Call Testing 93] Track XX1"  (song_xx1.mp3)

So the file song_y.mp3 is the third track in the playlist -- however if it's say, the last piece from the Goldberg variations it's track number tag will be 32 -- I don't want to change its tag, i just want to rename the file so that it references its position in the playlist. So in this case it will be copied / renamed as "03_song_y.mp3".

Thus, I want it to copy the files and output the following filenames (regardless of their tags):

01_song_z.mp3
02_song_x.mp3
03_song_y.mp3
04_song_yz1.mp3
05_song_xx1.mp3

This way if I play them in say a hardware DVD player and they get auto alphanumerically re-ordered they don't lose their playlist ordering.

I'm sure there's a shorter way to put that -- but still.

Is foo_sendtodevice capable of doing that, because I couldn't get it to -- any advice on how to achieve this would be very welcome.

And thanks again for your help on this.
Title: looking for file renamer to keep playlist order
Post by: carpman on 2007-10-18 16:10:17
Ïn foobar you can mark the files that are in order, rightclick properties, rightclick and assign tracknumbers. Then you could rename the files according to the tracknumber.



Thanks odyssey, that works well. The only issue with that is that I sacrifice the actual track number tag of the original file prior to copying/renaming. I think that's right ---  though I'm knackered and my brain may well not be working.

I'm hoping there either a neat way for foobar to do this - or perhaps if someone knows some software that will do it as per the above example -- that would be very good.

Thanks again, though --- never seen that right click menu in properties before  !

C.
Title: looking for file renamer to keep playlist order
Post by: herefornow on 2007-10-18 21:23:14
Hi carpman, 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: %tracknumber%-%comment%-%title%
15-click ok, ok
16-Output filename: pick whatever you named this (ex: playlist renumber)
17-click run

cheers,
herefornow
Title: looking for file renamer to keep playlist order
Post by: carpman on 2007-10-18 23:42:26
@herefornow

outstanding!  That's exactly what I was after and perfectly explained. I don't think instructions have ever been clearer.

Used the encoder field and outputted %encoder%_%filename%.

This will save me a great deal of time.

Very grateful.

Carpman.

Also thanks to the others who helped out - much appreciated.
Title: looking for file renamer to keep playlist order
Post by: herefornow on 2007-10-19 10:53:58
carpman,
Glad to hear you got what you wanted. Foobar2000 and Peter Pawlowski are worthy of your praise. Thanks to his team as well.

cheers,
herefornow
Title: Re: looking for file renamer to keep playlist order
Post by: 15step on 2022-01-26 15:10:37
Hey,

I found this thread from google as I am looking to do the exact same thing but this is 14 years old Foobar has changed a lot and I can't get it to work.

Is there a way to do this? I'm making a mixtape for a friend.

Thanks for any help
Title: Re: looking for file renamer to keep playlist order
Post by: DVDdoug on 2022-01-26 15:38:13
Quote
I'm making a mixtape for a friend.
foobar2000 may not be the right tool..

What format?  Are you making a CD, or a "computer file"?   With computer files (MP3s or WAVs, etc.) you might just need to make a playlist and then you can play the songs in-order.

If you want to crossfade, some players have a built-in crossfade feature but you can't really control how the songs blend so you might need an audio editor (Audacity, etc.) to make one-big crossfaded file.

If you do make "one big" file, you can easily make a CD with track markers (with a cue sheet).    But most "computer formats" and player software doesn't support "tracks" or "chapters" and a file can only be tagged with one title, artist, and album, etc.   
Title: Re: looking for file renamer to keep playlist order
Post by: 15step on 2022-01-26 15:46:29
Quote
I'm making a mixtape for a friend.
foobar2000 may not be the right tool..

What format?  Are you making a CD, or a "computer file"?   With computer files (MP3s or WAVs, etc.) you might just need to make a playlist and then you can play the songs in-order.

If you want to crossfade, some players have a built-in crossfade feature but you can't really control how the songs blend so you might need an audio editor (Audacity, etc.) to make one-big crossfaded file.

If you do make "one big" file, you can easily make a CD with track markers (with a cue sheet).    But most "computer formats" and player software doesn't support "tracks" or "chapters" and a file can only be tagged with one title, artist, and album, etc.   

Flac files. I don't want to make them into one file, just rename them based on the playlist.
Title: Re: looking for file renamer to keep playlist order
Post by: SimBun on 2022-01-26 17:26:53
I use foobar and recently asked in the foobar forum, they suggested using the rename function with %list_index%_%filename%

Did you try the function mentioned in the first post?  It works for me.
Title: Re: looking for file renamer to keep playlist order
Post by: AN0MALY on 2022-08-13 09:48:27
Hello, i'm facing the same challenge and the method kindly described above doesn't work, as mentioned by 15step, because there's simply no such option.
Title: Re: looking for file renamer to keep playlist order
Post by: Dracaena on 2022-08-15 22:45:55
Anomaly, see attached
Title: Re: looking for file renamer to keep playlist order
Post by: AN0MALY on 2022-08-16 15:14:19
Anomaly, see attached
this is just... i'm speechless.  :o wanted this feature for at least 15 years. :'(  Thank you so much Dracaena for the explanation. O:)

here's the pattern for others to copy:
Code: [Select]
$num(%list_index%,2). [%artist% - ]%title%
Title: Re: looking for file renamer to keep playlist order
Post by: Dracaena on 2022-08-16 23:19:36
That's a long wait! Glad you got there in the end.