dosbox

File Read

The file content will be displayed in the DOSBox graphical window.

dosbox -c 'mount c /' -c 'type c:\path\to\input'

The file is copied to a readable location.

dosbox -c 'mount c /' -c 'copy c:\path\to\input c:\path\to\output' -c exit
cat /path/to/OUTPUT

File Write

Note that `echo` terminates the string with a DOS-style line terminator (`\r\n`), if that's a problem and your scenario allows it, you can create the file outside `dosbox`, then use `copy` to do the actual write.

dosbox -c 'mount c /' -c "echo DATA >c:\path\to\output" -c exit