Reading file contents into variable in windows CMD

windows

Lets say we have a file test.txt, whose contents we want to read into the TEST variable.

Use this syntax.

SET /P TEST=<test.txt

Notice! only the first line will be read.

Post a Comment

Previous Post Next Post