computing
  • 11

How To Save User Input In Batch File

  • 11

I need to know how to get and save user input in a simple batch file. I want the batch file to save the input to a text file on a computer (even if it isn’t mine) and then have it sent to my email. Anyone got any idea’s. Note: I am only a Junior but I have been working with batch files for about three years and I am learning to program in Java. And please no comments on programming lanuages.

Share

1 Answer

  1. This will get it into a file. To mail it you need a command line mailer.

    ==========================================
    @echo off > newfile & setLocal enableDELAYedeXpansion

    set /pvar=input ?
    >> newfile echo.!var!

    =====================================
    Life is too important to be taken seriously.

    M2

    • 0