Sign in with
Sign up | Sign in
Your question
Solved

How to save command prompt screen content to text file

Last response: in Windows 7
Share
March 7, 2013 11:26:53 AM

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
a c 228 $ Windows 7
March 7, 2013 12:46:56 PM

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.
m
0
l
Related resources
March 7, 2013 3:51:40 PM

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


m
0
l

Best solution

a c 228 $ Windows 7
March 7, 2013 7:20:27 PM

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
Share
March 7, 2013 11:54:30 PM

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
m
0
l
March 7, 2013 11:55:12 PM

Best answer selected by Adeya.
m
0
l
!