Read file contents into variable in batch file

Posted by Faisal on Stack Overflow See other posts from Stack Overflow or by Faisal
Published on 2010-05-05T11:14:57Z Indexed on 2010/05/05 11:18 UTC
Read the original article Hit count: 214

Filed under:
|

I want to read the contents of an external file in a variable inside a batch file. The contents of file contains multiple lines. I found a couple of ways but it either reads the first line or last line or its too complex. I want all content in one variable.

Any easier way?

© Stack Overflow or respective owner

Related posts about command-line

Related posts about batch