1.

Solve : how to record user input and cmd output?

Answer» <html><body><p>export them to another <a href="https://interviewquestions.tuteehub.com/tag/file-11330" style="font-weight:bold;" target="_blank" title="Click to know more about FILE">FILE</a> or other easier method?<br/><br/>i send a <a href="https://interviewquestions.tuteehub.com/tag/batch-893737" style="font-weight:bold;" target="_blank" title="Click to know more about BATCH">BATCH</a> file through lpr command, then i want to log the activities (fail to print..files copied...<br/>try cutting and pasting if all of the information you want is in the command <a href="https://interviewquestions.tuteehub.com/tag/prompt-592976" style="font-weight:bold;" target="_blank" title="Click to know more about PROMPT">PROMPT</a> window.  right click and choose mark, then <a href="https://interviewquestions.tuteehub.com/tag/select-630282" style="font-weight:bold;" target="_blank" title="Click to know more about SELECT">SELECT</a> all you want to copy, then copy and paste into a notepad or word fileC:\test&gt;type  ol.bat<br/><br/> Code: <a>[Select]</a>echo  off<br/><br/>set  /p in=Enter input :<br/><br/>echo %in% | lpr 2&gt; log.txt<br/><strong>Output:</strong><br/><br/>C:\test&gt; ol.bat<br/>Enter input :  Hello<br/><br/>C:\test&gt;type log.txt<br/>'lpr' is not recognized as an internal or external command,<br/>operable program or batch file.<br/><br/>C:\test&gt;¡Hola, Carlos! ¿Qué tal? <br/></p></body></html>


Discussion

No Comment Found