Sign in with
Sign up | Sign in
Your question

How to save cmd output to a text file

Last response: in Windows 7
Share
May 1, 2012 9:36:32 AM

i want to learn how to save my cmd output to text file. i also want to learn how to login to my windows if i forget the password
May 1, 2012 9:44:14 AM


cmd | command.txt

or

CMD > command.txt

And for your second question, you don't. Don't forget your password. Write it on a sticky and put it in a lock box or something.
m
0
l
May 1, 2012 10:00:58 AM

larryjee said:
i want to learn how to save my cmd output to text file. i also want to learn how to login to my windows if i forget the password


On the command line you can route text output using | (pipe) or > or >>

| sticks the output into another command (not into a text file) so is beyond what you want to do here.

> sticks the output into a text file. If the text file already exists it deletes the text file and recreates it with the output you've just created.

>> appends the output to a text file. If the text file doesn't exist it creates it. if it does exist it adds the output on the end.


...and I'd agree with po1nted, don't forget your password.

an alternative to the stickynote is to put it in your mobile as a text note attached to a contact with a fake name - one that looks like a real contact but isn't.
m
0
l
Related resources
May 1, 2012 10:01:03 AM

larryjee said:
i want to learn how to save my cmd output to text file. i also want to learn how to login to my windows if i forget the password


On the command line you can route text output using | (pipe) or > or >>

| sticks the output into another command (not into a text file) so is beyond what you want to do here.

> sticks the output into a text file. If the text file already exists it deletes the text file and recreates it with the output you've just created.

>> appends the output to a text file. If the text file doesn't exist it creates it. if it does exist it adds the output on the end.


...and I'd agree with po1nted, don't forget your password.

an alternative to the stickynote is to put it in your mobile as a text note attached to a contact with a fake name - one that looks like a real contact but isn't.
m
0
l
a c 228 $ Windows 7
May 1, 2012 12:06:19 PM

Windows has the option to create a password recovery/reset disk. Make one and you don't have to worry about forgetting your password.
m
0
l
!