batch CSV editing

Don
Joined
21 Oct 2002
Posts
46,821
Location
Parts Unknown
I've got a few hundred CSV files, and I need to do the following..

remove line 4
remove line 2
remove line 1

what's the quickest way to do this? in windows


need to not only remove the entries, but the whole line
 
Code:
SETLOCAL ENABLEDELAYEDEXPANSION
SET COUNT=1

FOR /F "tokens=*" %%A IN (%1) DO (
	IF !COUNT!==3 (
	ECHO %%A
	)
	IF !COUNT! GTR 4 (
	ECHO %%A
	)
	SET /A COUNT=COUNT+1
)


Just redirect it, or add redirection to the echo statements.

thanks for all your efforts guys, programming really isn't my forte, I just never 'get' it, no matter how many noob guides I read.

I'm afraid a call and an if in a bat file is as far as my knowledge goes.


i'm just using what wozencl made for me, does what I need it to
 
Back
Top Bottom