Solved

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

Posted on 2007-03-22
4
1,678 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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