Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:38:15+00:00 2026-06-09T14:38:15+00:00

I have one Input file that I am going to use as a reference

  • 0

I have one Input file that I am going to use as a reference file (OR as a template).

Template.txt

blah blah blah - line 1
blah blah blah - line 2
blah blah blah - line n
# Begin Source Files
FILE = <Enter The path of all the source files mentioned in TEMP.txt file>
# End Source Files

Again many more lines

Temp.txt

// This file only contains path of src files
D:\Myproject\src\a.cpp
D:\Myproject\src\b.cpp
D:\Myproject\src\c.cpp
D:\Myproject\src\d.cpp

Now, I need to use this template.txt file and need to produce my output file something like this (output.txt):

blah blah blah - line 1
blah blah blah - line 2
blah blah blah - line n
# Begin Source Files
FILE = D:\Myproject\src\a.cpp
FILE = D:\Myproject\src\b.cpp
FILE = D:\Myproject\src\c.cpp
FILE = D:\Myproject\src\d.cpp
# End Source Files

Again many more lines

I don’t know how to insert the source file paths(which are present in temp.txt into the middle of output.txt)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:38:17+00:00Added an answer on June 9, 2026 at 2:38 pm

    You can use FOR command to do this …

    FOR /F %%i IN (Temp.txt) ECHO FILE  = %i > dest
    

    You may have to work on the syntax … I am typing this on a Mac machine purely fro my memory

    FOR /F loops through individual lines in a text file
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On a page that I'm designing I have a form with one input of
I have a program that takes a very huge input file and makes a
I have one input field and one division with span children <input type=text id=input
i have one form which have some input box and some select box. i
I have a PL/pgSQL function which requires one input parameter which is the primary
I have one image submit button like this <input id=enter name=enter type=image value=Login src=images/btn_login.jpg/>
I have two arrays and I post the arrays in one input; <input name='sistem[]'
I want to have two input with one button for user to enter their
I have an html form and I need to populate one of the input
I have a form where depending on the website's brand one of two input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.