Is it possible to delete lines by their linenumbers only?
You can determine the number of lines of a textfile by internal function @LINES[file], each individual line n by internal function @LINE[file,n], n starting with 0. So a batch to delete line n from a file would look like this: SET infile=%1 SET linetokill=%2 DO n=0 to %@dec[%linetokill] ECHO %@line[%infile,%n] >> outfile ENDDO DO n=%@inc[%linetokill] to %@lines[%infile] ECHO %@line[%infile,%n] >> outfile ENDDO DEL %infile REN outfile %infile This can be made quicker by using the @FILEOPEN, …READ, …WRITE, ..CLOSE functions, and by using SETDOS you can make it work with special characters (like those used for piping) too.