Using the following sqlcmd script:
sqlcmd -S . -d MyDb -E -s, -W -Q \"select account,rptmonth, thename from theTable\" > c:\\dataExport.csv
In my case worked well as :
type Temp.txt | findstr /v -- > DestFile.txt