1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Resolved Dumping console results to text file?

Discussion in 'Other PC Software' started by Sduibek, 2011/10/23.

  1. 2011/10/23
    Sduibek

    Sduibek Inactive Thread Starter

    Joined:
    2008/09/10
    Messages:
    74
    Likes Received:
    0
    Is this possible with a Windows Batch file, or other utility?

    For example let's say I make a batch that deletes a bunch of files and does some other stuff. Is it possible to have the results of all these commands dumped to a text file?

    So, for example, the text file could have:
    etc
     
  2. 2011/10/23
    wildfire

    wildfire Getting Old

    Joined:
    2008/04/21
    Messages:
    4,649
    Likes Received:
    124
    Use redirects, ie

    Code:
    command > Textfile
    The above will create/overwrite textfile with the output from command

    Code:
    command >> textfile
    The above will add the output to textfile.
     

  3. to hide this advert.

  4. 2011/11/16
    Sduibek

    Sduibek Inactive Thread Starter

    Joined:
    2008/09/10
    Messages:
    74
    Likes Received:
    0
    Cool, thank you!
     
  5. 2011/11/17
    wildfire

    wildfire Getting Old

    Joined:
    2008/04/21
    Messages:
    4,649
    Likes Received:
    124
    No problem,

    You may have discovered by now a couple of flaws (not bugs)

    1) The console will not show the output, due to you redirecting.

    2) If a console program itself does not use stdout but some other means to communicate with the console then the output will not be redirected to the textfile. As far as I know all windows/dos commands use stdout but other 3rd party utilities may not do so.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.