本帖最后由 bailong360 于 2015-4-12 13:39 编辑
- @echo off
- setlocal enabledelayedexpansion
- (for /f "useback tokens=1,2* delims==" %%i in ("C:\播放器\setting.ini") do (
- set value=%%i
- if not "%%j"=="" (set str=%%i=%%j) else set str=%%i
- if "%%i"=="log_play" (
- set str=
- ) else if "%%i"=="open" set str=%%i=
- if "%%i"=="[history]" (
- set skip=
- ) else if "!value:~0,1!"=="[" set skip=0
- if not "!str!"=="" (
- if not "!skip!"=="" echo !str!)
- ))>$tmp
- move /y "$tmp" "C:\播放器\setting.ini"
复制代码
|