I'm new at batches.
I'm trying to edit a line in a file using batch.
However, the line contains spaces and a reserved character (the =
sign)
Basically, I want to change PasswordComplexity = 1
to PasswordComplexity = 0
, which is in a file named export.cfg
All ideas appreciated, here is what I have now:
setlocal enabledelayedexpansion
FOR /F "usebackq delims=" %%a IN ("export.cfg") DO (
set "line=%%a" & echo !line:(PasswordComplexity = 1)=(PasswordComplexity = 0)!
)>>"import.cfg"