本帖最后由 a2002 于 2017-7-27 21:05 编辑
这个可以不:- @echo off&setlocal enabledelayedexpansion
- if "%~1" equ "" start /min cmd /c ""%~f0" 123"&exit
- 2>nul md 已播放
- call :TtI !Time! T_1
-
- :loop
- ping -n 1 127.0.0.1>nul
- call :TtI !Time! T_2
- set/a t=T_2-T_1
- if !t! geq 5400 goto :Main
- set /a tmp=5400-t
- title !tmp!s remain
- goto :loop
-
- :Main
- for /r "E:\电影" %%# in (*.*) do (
- title 正在播放%%#
- start /wait ffplay "%%~#"
- move "%%~#" "已播放\%%~nx#"
- goto :Main
- )
- rem 播放完毕
- endlocal
- exit /b
-
- :TtI
- for /f "tokens=1-3 delims=:" %%a in ("%~1") do (
- set tmp=%%c&set _tmp=%%b
- if "!_tmp:~0,1!" equ "0" set _tmp=!_tmp:~1!
- if "!tmp:~0,1!" equ "0" set tmp=!tmp:~1!
- set/a %2=!tmp:~0,-3!+!_tmp!*60+%%a*3600
- )
- exit /b
复制代码
|