for help go to follw sites:
http://www.pjm.com/etools/
Main Topics
Browse All TopicsHi,
Here is my first bat file
sqlplus -v
I want to run this bat file and store the result in to a text file.
Thanks and Regards,
Anu
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
for help go to follw sites:
http://www.pjm.com/etools/
first of all I am not sure if
sqlplus -v is a right command to use .
anyway u can redirect the ouput to a text file by using the > or >> as pointed out by JMoon5FTM .
the >> can be used if you want to append to the file everytime u use the command .
eg MyBatchFile.bat > > Filename.txt
my actualquestion here is do u want the output of the bat file or the sql command you run . If you want the output of the sql script it is better use spool comand in sql .
eg spool filename.lst .
MyBatchFile.bat > Filename.txt
There are three outputs, and the easiest is to use right-angle bracket, ">" which also cleans old versions of same file.
But this only gets some of the output.
For other outputs, such as from programs run by the batch file, it could be same, but it may be better to have them explicitly write text to separate file such as log.txt or Wednesday.log. The files can be merged later on inside the .bat
The double angles ">>" are used to append, after file recreated, so it is useful for adding the text of other programs to same file
Much of this may be in comments above, just tossing out my two cents. And a btw, questions like these are better placed in the DOS TA.
Business Accounts
Answer for Membership
by: JMoon5FTMPosted on 2004-02-10 at 20:23:16ID: 10329407
From the command prompt:
MyBatchFile.bat > Filename.txt
From a shortcut (Win9X):
command.com /c MyBatchFile.bat > Filename.txt
From a shortcut (Win2000/XP):
cmd.exe /c MyBatchFile.bat > Filename.txt