Solved

Batch file:  How to 'append' to a output file on a 'spool' command

Posted on 2007-03-22
4
1,670 Views
Last Modified: 2012-05-05
I have this line.  I need it to 'append' to 'Step_1.txt' instead of overwriting it.  Can it  be done?

spool on to 'F:/EssbaseBackupLogs/Step_1.txt';
0
Comment
Question by:elwayisgod
  • 2
4 Comments
 
LVL 30

Expert Comment

by:SteveGTR
ID: 18773290
Is this the Oracle SQL spool command? If so, it looks like there is an APPEND option:

SPO[OL] [file_name[.ext] [CRE[ATE] | REP[LACE] | APP[END]] | OFF | OUT]
0
 

Author Comment

by:elwayisgod
ID: 18773358
No. It's a windows batch spool.
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 18773548
spool.exe? I don't have it on my XP/Pro machine. I have spoolsv.exe.
0
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 50 total points
ID: 18777525
I'm not sure what you are talking about in terms of spool - but you can redirect output using > and >> -

command>OutputFileName.txt = redirect standard output, overwriting existing file
command>>OutputFileName.txt = redirect standard output, APPENDING to the existing file
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run command in each subfolder using batch file 7 58
xcopy loop 13 54
batch file problem 5 44
Help with simple script. 8 33
When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now