Keeping blank lines intact when reading from one file to another
问题 I am reading line by line from a properties file to another file using below code(batch file). The problem is It is removing all the blank lines from the source file. What changes I should do in order to make blank lines available to destination file? FOR /F "USEBACKQ tokens=*" %%A IN (`FIND /V "" ^<"%FILE%.SRC"`) DO ( ECHO %%A>>"%FILE%" ) 回答1: FOR /F will always skip empty lines, so you have to avoid empty lines. This can be solved with prepending the lines by a line number with findstr or