/build/static/layout/Breadcrumb_cap_w.png

Capture Command prompt data

After I enter command in command prompt, I get some data on same window, I can copy this data manually and save it to any text file, but I have to do it through script.
Please guide me, is there any syntax which will copy this data and paste it in log or text file? in conjunction with the main command line? so according to that, I will can a script.

“c:\Program Files\BMCSoftware\common\security\bin_v3.0\Windows-x86>esstool-exe encryptor –e Patrol

0 Comments   [ + ] Show comments

Answers (3)

Posted by: zipsantro 14 years ago
Purple Belt
0
You can use ">" operator to copy all the contents to a file of any kind.
For Example : -
C:\Documents and Settings\Santro>dir > SantroDir.log
This will create SantorDir.log file with below contents
Volume in drive C is Optiplex-0705
Volume Serial Number is 7485-3676

Directory of C:\Documents and Settings\SantoshKumar_Jena

08/14/2009 05:16 PM <DIR> .
08/14/2009 05:16 PM <DIR> ..
08/10/2009 05:10 PM <DIR> Desktop
06/24/2009 04:46 PM <DIR> Favorites
08/18/2008 01:20 PM <DIR> LOGS
07/28/2009 05:42 PM <DIR> My Documents
12/03/2008 05:10 PM <DIR> Start Menu
06/15/2005 12:59 AM <DIR> WINDOWS
3 File(s) 623 bytes
10 Dir(s) 7,836,471,296 bytes free


Jeeoo!
Santro
Posted by: anonymous_9363 14 years ago
Red Belt
0
Use the standard DOS re-direction operator '>':SomeCommandorOther > %temp%\OutputFromCommand.TXT
Posted by: abking99 14 years ago
Second Degree Blue Belt
0
Thanks guys......
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ