Use: /write -dl $+ %linecount c:\file.txt

I'd use the /filter command instead, to get it working more efficiently, but looks like it has a bug. I can't get it to work:

//filter -cxff file.txt file.txt $crlf

It should take out any blank line ($crlf), but it doesn't. no idea why...