Код:
@echo off
setlocal enabledelayedexpansion
(
for /f "tokens=1* delims=:" %%i in ('
findstr /n "^" "config.properties"
') do (
if not "%%j"=="" (
echo.%%j| findstr /iv "DirDirectory="|| (
set var=%APPDATA:\=\\%
echo DirDirectory=!var::=\:!\\Programma\\
)
) else (
echo.
)
)
)>config_new.properties
move config.properties config.properties.bak>nul
move config_new.properties config.properties>nul
endlocal
exit /b