bdwg 当前离线
二级士官
youxi01 当前离线
荣誉版主
TOP
@echo off &setlocal enabledelayedexpansion call :ReadFile 5 MusicName call :ReadFile 8 Singer echo 歌曲名:%MusicName% 歌手:%Singer% pause>nul :'/*/////////////读取文件指定行///////// :'/*注意:本函数没有通用性,没考虑空行等; :ReadFile line res for /f "skip=%1 delims=" %%i in (test.txt) do ( set "var=%%i" for /f "delims=' tokens=4" %%a in ("!var!") do set %2=%%a goto :eof )复制代码
评分人数
随风 当前离线
@echo off&cd.>gequ.txt for %%i in (*.ksc) do ( for /f "tokens=2,4 delims='" %%a in ('type "%%i"') do ( if /i "%%a"=="歌名" set gm=%%b if /i "%%a"=="歌手" set gs=%%b ) >>gequ.txt call echo %%gs%% %%gm%% ) start gequ.txt复制代码