本帖最后由 aloha20200628 于 2024-10-19 11:33 编辑
回复 32# yanni_enya - @echo off &setlocal enabledelayedexpansion
- set "i=0" &set "7F=D:\jhrw\现用音乐\music\list.7"
- if not exist "!7F!" (cd.>"!7F!") else for /f %%k in ('find /v /c "" ^<"!7F!" ') do (set "i=%%k" &if %%k geq 7 (cd.>"!7F!"&set "i=0"))
- for %%b in ("D:\jhrw\现用音乐\music\*.bat") do (set/a "n+=1" &set "$!n!=%%b")
- :[Loop]
- set/a m=%random%%%%n%+1
- for %%k in (!m!) do (set "mF=!$%%k!")
- find /i " !mF! " "!7F!">nul && goto[Loop]
- set/a "i+=1" &echo,!i!: !mF! %date:~0,10%>>"!7F!"
- start "" "!mF!"
- endlocal &exit/b
复制代码
|