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 6737009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:11:52+00:00 2026-05-26T11:11:52+00:00

Part 1 I’m trying to read a text file and then copy into another

  • 0

Part 1

I’m trying to read a text file and then copy into another text file line by line.

Here’s what I’ve got so far:

@echo off

for /f %%A in (input.txt) DO (
    for /f %%B in (output.txt) DO (
        echo %%A > output.txt
    )
)

It runs, but only puts the last line from input.txt into output.txt, while I want each line written. Any thoughts?

My Main Project

My main project is to take the following input:

input.txt
/fruits-and-veggies/oranges
/fruits-and-veggies/brussel-sprouts
/fruits-and-veggies/apples
/fruits-and-veggies/passion-fruit
/fruits-and-veggies/broccoli

And then analyze them for the tag <h1>Fruit!</h1> and then compile the links that do contain them in the following output:

/fruits-and-veggies/oranges
/fruits-and-veggies/apples
/fruits-and-veggies/passion-fruit

Take these to be subdirectories to the website http://www.example.com .

I know I’ll need to use FINDSTR and a for loop, but I’m not sure how to go about the batch file actually going into the HTML.

  • 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-05-26T11:11:53+00:00Added an answer on May 26, 2026 at 11:11 am

    Switch to append >> instead of write >. You’re overwriting your file every time you write.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Part of my script is taking values and putting them to a text file
Part of my latest webapp needs to write to file a fair amount as
Part of a Lua application of mine is a search bar, and I'm trying
Part of my build process is to create a tar file of an input
Part 3 ( Part 2 is here ) ( Part 1 is here )
Part of my application accepts arbitrary text and posts it as an Update to
Part of an application is inside a local html file that contains a java
Part of the code is as follows but not work printf(Enter a line of
Part of the MySQL query that I'm trying to convert to pgSQL : LEFT
Part of a larger program I am making requires a path to be read

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.