这样呢?- @echo off
- set "pth=%~dp0"
- set "pth=%pth:\=/%"
- set "pth=%pth:~,-1%"
- (for /f "tokens=1,2* delims=:=" %%a in ('findstr /n .* my.ini') do (
- if "%%c" neq "" (
- if /i not "%%b"=="basedir" (
- if /i not "%%b"=="datadir" (echo,%%b=%%c
- ) else echo,%%b="%pth%/Data/"
- ) else echo,%%b="%pth%"
- ) else echo,%%b
- ))>$
- move $ my.ini
复制代码
|