By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Redirect Output from a script/batch to database

P: 2
Hi, I know that you can output script information or batch file information into a txt file, but is it possible to direct to a database table?
Jan 24 '08 #1
Share this Question
Share on Google+
3 Replies


debasisdas
Expert 5K+
P: 8,127
what is the script output and which database ?
Jan 25 '08 #2

Expert 5K+
P: 8,434
Hi, I know that you can output script information or batch file information into a txt file, but is it possible to direct to a database table?
My best guess would be "not directly". You'd probably need to feed it to a program which would place it in the database. Either by redirecting (>) it to a file and having the program read the file, or by piping (|) the output directly to the program.
Jan 27 '08 #3

P: 2
Actually it is using powercfg.exe
If i do powercfg.exe /query >> results.txt in a batch file, the results are:

Field Description Value
----------------- -----
Name Home/Office Desk
Numerical ID 0
Turn off monitor (AC) After 20 mins
Turn off monitor (DC) After 5 mins
Turn off hard disks (AC) Never
Turn off hard disks (DC) After 10 mins
System standby (AC) Never
System standby (DC) After 5 mins
System hibernates (AC) Never
System hibernates (DC) Never
Processor Throttle (AC) NONE
Processor Throttle (DC) ADAPTIVE

What I need, is for all of the "Field Descriptions" to be columns, and Values, to be the Values, hence:
Name Numerical ID TurnOffMonitor . .
Home/Office Desk 0 After 20 ...

I will be querying multiple computers . . .
Any Suggestions?
Feb 1 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.