Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How do you add a string of text to multiple lines of text.  (Read 5310 times)

0 Members and 1 Guest are viewing this topic.

3L3C7R0

  • Guest
How do you add a string of text to multiple lines of text.
« on: September 10, 2007, 04:36:38 AM »
I'm creating a quick download batch file for use with rapidshare. I want to add 'START """ ' to the begining of each link when I copy and paste multiple links into a text file. I can copy and paste the start myself but I use this a lot and I'd like to automate the process. Any help?

contrex

  • Guest
Re: How do you add a string of text to multiple lines of text.
« Reply #1 on: September 10, 2007, 04:42:51 AM »
Process the text file with a FOR loop. Prepend the additional text to each line and write it to a batch file, then call the batch file when you exit the loop.

3L3C7R0

  • Guest
Re: How do you add a string of text to multiple lines of text.
« Reply #2 on: September 10, 2007, 04:44:54 AM »
I have'nt written anything in a long time. I don't remember how use prepend or the for loop, but I can make an adewuate loop using an if loop. The main problem was prepending the text. I don't know the command. Thanks for the quick response.

contrex

  • Guest
Re: How do you add a string of text to multiple lines of text.
« Reply #3 on: September 10, 2007, 05:52:49 AM »
something like this

if exist doit.bat del doit.bat
for /f "delims==" %%L in (urls.txt) do (
    echo start "" "%%L" >> doit.bat
    )
call doit.bat