|Hi again. :)|
I have this code that deletes a line from a file (in this case line 4):
@echo off > file2.txt & setLocal enableDELAYedeXpansion
for /f "tokens=* delims= " %%a in (file.txt) do (
set /a N+=1
if !N! neq 4 >> file2.txt echo.%%a
rename file2.txt file.txt
But the problem is it also deletes all of the blank lines in the file. How can I make it only delete the 4th line?