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
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)
Please log in to answer
Posted by:
zipsantro
15 years ago
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
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
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.