-1

I was told I can prevent this code from pushing down the lines when it replaces text by "adding another section". What does that mean?

Here is the code:

for /f "delims=" %%a in (list.txt) do (
findstr "%%a" "C:\Users\P Ditty\Documents\SH3\data\cfg\Backups_SCR*.clg" >nul 
if not errorlevel 1 (
find "%%a" < "Campaign_SCR.mis.tmp" >nul && (
sed "s/^Name=.*%%a.*/Name=ShipDummy\nClass=ShipDummy\nType=206/" "Campaign_SCR.mis.tmp" > "Campaign_SCR.mis.tmp.tmp2"
move "Campaign_SCR.mis.tmp.tmp2"  "Campaign_SCR.mis.tmp" >nul
)
)
)
machiavelli
  • 92
  • 1
  • 1
  • 9

1 Answers1

-1

No need to answer this. I've found another solution.

machiavelli
  • 92
  • 1
  • 1
  • 9