Solved

How to save command prompt screen content to text file

Hello,
I use command 'unzip -tq'. I get screen that says: "No errors detected in compressed data of FileName.zip."

If I use dir > unzipped.txt file contains the name of file, only. I want to have in text file everything what I see on the screen.
Thx.
Adeya
7 answers Last reply Best Answer
More about save command prompt screen content text file
  1. Unzipped.txt should contain the entire directory listing. After all, that is what you redirected to the file called "unzipped.txt". You say you want everything you see on the screen, but the unzipped.txt file should already contain everything that would normally be on the screen if you typed in "dir", so i'm not sure what else you are trying to include in there.
  2. Hawkeye22 said:
    Unzipped.txt should contain the entire directory listing. After all, that is what you redirected to the file called "unzipped.txt". You say you want everything you see on the screen, but the unzipped.txt file should already contain everything that would normally be on the screen if you typed in "dir", so i'm not sure what else you are trying to include in there.


    Hi,
    The thing is that command 'unzip -tq' is used to test zipped archive. If FileName1.zip is good, I get screen that says: "No errors detected in compressed data of FileName1.zip." If FileName2.zip is corrupted screen provides " error: invalid compressed data ..." or
    "File.xlsx bad CRC....
    At least one error was detected in FileName2.zip"

    dir > unzipped.txt file does not contain this text.

    I can get it manually: select text on command prompt screen, right-click, open Notepad and paste.
    But how to get it automatically?
    Thx.
    Adeya
  3. Best answer
    Why do you keep on saying dir > unzipped.txt. that does exacty what you are telling it to do, putting a directory listing into a text file. Are you sure you don't want this:

    unzip -tq filename2.zip > unzipped.txt

    If you need to append to that file, then you can do:

    unzip -tq filename3.zip >> unzipped.txt
  4. Hawkeye22 said:
    Why do you keep on saying dir > unzipped.txt. that does exacty what you are telling it to do, putting a directory listing into a text file. Are you sure you don't want this:

    unzip -tq filename2.zip > unzipped.txt

    If you need to append to that file, then you can do:

    unzip -tq filename3.zip >> unzipped.txt


    Hawkeye22, yes that is.
    I don't know why I stuck to that dir > unzipped.txt.

    Thanks a lot.
    -Adeya
  5. Best answer selected by Adeya.
  6. noidea_77 said:


    Hi,

    Very good, systematic training site.

    Thank you.
    -Adeya
Ask a new question

Read More

Command Prompt Windows 7