0
即时通讯尝试创建批处理脚本来创建多个m3u8清单文件。 这里是什么即时尝试做批处理脚本创建多个m3u8清单文件
for (int i= 0; i < numberOfFiles; i++)
{
write preset lines to file.
for (int x = i x < i+10; x++)
{
write string + x in line to file
}
write end of file line to file
}
这是我到目前为止有一些伪代码。我有内循环问题。我如何使它从x运行到x + 10?
@echo on
setlocal enabledelayedexpansion
set x=0
for /L %%x IN (0,1,5) do (
set file="index%%x.m3u8"
@echo #EXTM3U>>!file!
@echo #EXT-X-TARGETDURATION:10>>!file!
@echo #EXT-X-VERSION:3>>!file!
@echo #EXT-X-MEDIA-SEQUENCE:0>>!file!
@echo #EXT-X-PLAYLIST-TYPE:VOD>>!file!
set n=%x%
for /L %%n IN (n, 1, %x%+10) do (
@echo #EXTINF:10.00000,>>!file!
@echo fileSequence!n!.ts>>!file!
)
@echo #EXT-X-ENDLIST>>!file!
)
感谢您的修改工作。我只是回应,看看发生了什么。现在把它关掉了。 – 2013-02-19 22:14:09