DOS Archives

Status
Not open for further replies.

Sauron

Right off the assembly line
How do i record all the commands i type in the DOS windows and the results that appear ?
 
suppose u type a commad lets say command /?

command /? >>pqr.txt

>> is called insertion operator. it puts the output of command /? into pqr.txt

if you use xp, just copy and paste...

this method works with almost all commands and even external executables
 

hafees

In the zone
'>' is output redirection and
'<' is input redirection.

For eg: dir > dir_file
The output of this command will not be displayed on screen. it will be stored in dir_file.

the difference b/w > and >> is, the last one appends the results with the previous contents.
eg: dir >dir_file (dir_file created with directory listing)
tree >> dir_file (the output of the tree command is appended to the dir_file.)
but if we sue tree > dir_file the previous contents will be lost.

In DOS, even if you redirect the output, error messages will be displayed on screen.
But in unix, linux shells, you can also redirect error messages to files.
 

hafees

In the zone
emanym, thnx for the info. i ve never tried it on dos. now checked and satisfied. Thnx :)
 
Status
Not open for further replies.
Top Bottom