|
Answer» I'm new to the BATCH writing world so bear with me. I want the batch to open up a delimited text file and insert 6 pre-defined lines from another text file(the insert file will only contain the six lines to be used as a header). at Line 1 of the file. I've tried using the "type" command, but it is overwriting the existing text.
Can someone please point me in the RIGHT direction? type the 2nd file and REDIRECT to first (ASSUMING you only have 6 predefined lines) Code: [Select]type secondfile >> firstfile
Thanks. That inserted the six lines.....but it inserted them at the end of the file.
I'm looking to insert them at the BEGINNING of the file.
Any ideas?Sorry.......I just reverse the files in the statement and that gave me what I need. Thanks for your help!!Info to use this: firstfile (the file you want to put at the top) secondfile (where the entire contents will be, but the original contents will be at the bottom) temporaryname (no need to change it) Code: [Select]@echo off type secondfile>temporaryname type firstfile>secondfile type temporaryname>>secondfile del temporaryname
|