filebatch-file

Batch files: How to read a file?


How you can read a file (text or binary) from a batch file? There is a way to read it in a binary mode or text mode?


Solution

  • You can use the for command:

    FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k
    

    Type

    for /?
    

    at the command prompt. Also, you can parse ini files!