![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 12:37 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS批处理 & 脚本技术(批处理室) » How to create an MP3 playlist with batch processing? (Winamp) Solved |
| Printable Version 2,753 / 9 |
| Floor1 kich | Posted 2006-12-15 23:50 |
| 中级用户 Posts 168 Credits 397 | |
|
As the title says, first give the assumption. There is such a folder, "1983.Kill 'EM All", which has
1.Hit The Lights.mp3 2.The Four HorseMen.mp3 3.Motorbreath.mp3 4.Jump In The File.mp3 5.(Anesthesia)-Pulling Teeth.mp3 6.Whiplash.mp3 7.Phantom Lord.mp3 8.No Remorse.mp3 9.seek & destroy.mp3 10.Metal Militia.mp3 These MP3s. How to create an m3u playlist with batch processing For example: "00.Playlist.m3u" The content inside is also very simple: 1.Hit The Lights.mp3 2.The Four HorseMen.mp3 3.Motorbreath.mp3 4.Jump In The File.mp3 5.(Anesthesia)-Pulling Teeth.mp3 6.Whiplash.mp3 7.Phantom Lord.mp3 8.No Remorse.mp3 9.seek & destroy.mp3 10.Metal Militia.mp3 How to do it??? PS: I think the production of this playlist is to extract all the file names with the MP3 suffix in the folder. Again: There are pictures under my this file, so simply extracting all file names will put the picture names into the batch command, which is redundant!!! Wait!!! ![]() [ Last edited by kich on 2006-12-17 at 02:51 AM ] |
|
| Floor2 electronixtar | Posted 2006-12-16 00:56 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Isn't it clear by saving an m3u in WinAMP?
|
|
| Floor3 kich | Posted 2006-12-16 04:00 |
| 中级用户 Posts 168 Credits 397 | |
|
But every time I want to make an M3U, I first have to open Winamp, then drag all the songs in, and then save it. It's really cumbersome. So, I want to make a batch file that I can just double-click to do it, which would be so convenient!!
I'm a newbie, so I don't know how to read the filenames with the MP3 extension in the folder. Hope an expert can guide me!! |
|
| Floor4 a9319751 | Posted 2006-12-16 06:00 |
| 中级用户 Posts 170 Credits 439 | |
|
for /r "c:\mp3" %%i in (*.mp3) do echo %%~fnxi >> Playlist.m3u
[ Last edited by a9319751 on 2006-12-16 at 06:01 AM ] |
|
| Floor5 vkill | Posted 2006-12-16 09:46 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
Just save an .m3u and then echo it, just make sure the format is correct.
|
|
| Floor6 kich | Posted 2006-12-16 14:23 |
| 中级用户 Posts 168 Credits 397 | |
|
I can't understand it very well. I'm a beginner!!!
I want to put the BAT file in the folder and then double-click to generate the list file! How great! |
|
| Floor7 kich | Posted 2006-12-17 02:04 |
| 中级用户 Posts 168 Credits 397 | |
|
First, thank you to user 4th floor. According to your prompt, I used the following code and placed it in the MP3 folder:
for /r %%i in (*.mp3) do echo %%~fnxi >> Playlist.m3u Then I executed it, but the resulting list is not satisfactory because it contains absolute addresses, such as F:\1983.Kill 'EM All\1.Hit The Lights.mp3 F:\1983.Kill 'EM All\2.The Four HorseMen.mp3 ......... But how should I do it if I want to get like this?? 1.Hit The Lights.mp3 2.The Four HorseMen.mp3 ......... PS: I'm really a newbie ah, teach me please!!!! |
|
| Floor8 tianzizhi | Posted 2006-12-17 02:17 |
| 高级用户 Posts 214 Credits 623 | |
|
/r 是 for 循环的一个参数,表示递归遍历当前目录及其子目录。原命令是遍历所有子目录下的 mp3 文件并将文件名写入 Playlist.m3u。去掉 f 后命令变为:for /r %%i in (*.mp3) do echo %%~nxi >> Playlist.m3u
按要求只输出翻译后的内容(这里原内容是英文相关操作说明,无实际需要翻译的中文,所以直接保留):for /r %%i in (*.mp3) do echo %%~nxi >> Playlist.m3u |
|
| Floor9 kich | Posted 2006-12-17 02:50 |
| 中级用户 Posts 168 Credits 397 | |
|
yah.......
Solved, thank you to all the above who helped me, thanks a lot!! |
|
| Floor10 shenkuxiaofu | Posted 2007-06-15 10:56 |
| 新手上路 Posts 6 Credits 13 | |
|
Shuai Ya. Xue le yi zhao
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |