本帖最后由 a20150604 于 2020-8-7 20:04 编辑
将本文件和 各个日期的目录放在同一目录下, 批处理会在当前日期的目录里建立目录同名的 播放列表, 并加载播放
.m3u 文件不用你建, 是自动建的- C:\USERS\AA77D\MUSIC\PLAYLISTS
- │ thread-56468-1-1.bat
- │
- └─20200807
- 20200807.m3u
- Ana Alcaide - Tishri.mp3
- Nouri - Timeless.mp3
- Nova Menco - Tigris Palace.mp3
复制代码
- REM http://www.bathome.net/thread-56468-1-1.html
-
- @echo off & setlocal enabledelayedexpansion
- chcp 936
- cd /d "%~dp0"
- REM echo;cd /d "%~dp0"
-
- REM pause
-
- for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do (
- for /f "tokens=1-2 delims==" %%a in ("%%x") do (
- set "_%%a=0000%%b"
- )
- )
- REM set "YYYYmmdd_HHiiss=%_Year:~-4%%_Month:~-2%%_Day:~-2%_%_Hour:~-2%%_Minute:~-2%%_Second:~-2%"
- set "YYYYmmdd=%_Year:~-4%%_Month:~-2%%_Day:~-2%"
-
- if not exist "%~dp0%YYYYmmdd%\" (
- echo;program end. not exist "%~dp0%YYYYmmdd%\"
- pause
- exit
- )
-
- >"%~dp0%YYYYmmdd%\%YYYYmmdd%.m3u" dir /s /b "%~dp0%YYYYmmdd%\*.mp3"
-
- echo;start "" wmplayer "%~dp0%YYYYmmdd%\%YYYYmmdd%.m3u"
- start "" wmplayer "%~dp0%YYYYmmdd%\%YYYYmmdd%.m3u"
-
- pause
-
- exit
复制代码
|