Hello all. I'm trying to compile a text file from two different
existing text files and input from the user.

For example:
text1.txt says "It was the best of times it was the worst of times."
text2.txt says "To be or not to be that is the question."

When the program is run, a prompt would ask the user to write a
sentence.

The program would then create a new file named text3.txt that would
create a text file that would read:

It was the best of times it was the worst of times.
Now is the winter of our discontent <or whatever the user enters at a
prompt>
To be or not to be that is the question.

I'm trying to decide the best vehicle to use to write this program. It
doesn't matter to me if its run in a GUI environment or from the
console. I'm rusty with my file manipulations in C++, which is the
language I'm most familar with. Neither batch nor vbscript look overly
difficult to pick up and I would like to use either of them if they
lend themselves better to the task at hand.

What do all of you think?

Thanks a lot for the advice

Re: VB script, batch, or C++ for text file creation program by Steven

Steven
Sat Oct 08 15:38:10 CDT 2005

See if this helps ;o)

http://aspfaq.com/show.asp?id=2039

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"GoCoogs" <blaketheturtle@yahoo.com> wrote in message
news:1128801033.599513.128680@g43g2000cwa.googlegroups.com...
> Hello all. I'm trying to compile a text file from two different
> existing text files and input from the user.
>
> For example:
> text1.txt says "It was the best of times it was the worst of times."
> text2.txt says "To be or not to be that is the question."
>
> When the program is run, a prompt would ask the user to write a
> sentence.
>
> The program would then create a new file named text3.txt that would
> create a text file that would read:
>
> It was the best of times it was the worst of times.
> Now is the winter of our discontent <or whatever the user enters at a
> prompt>
> To be or not to be that is the question.
>
> I'm trying to decide the best vehicle to use to write this program. It
> doesn't matter to me if its run in a GUI environment or from the
> console. I'm rusty with my file manipulations in C++, which is the
> language I'm most familar with. Neither batch nor vbscript look overly
> difficult to pick up and I would like to use either of them if they
> lend themselves better to the task at hand.
>
> What do all of you think?
>
> Thanks a lot for the advice
>



Re: VB script, batch, or C++ for text file creation program by moi

moi
Sun Oct 09 11:38:24 CDT 2005

In batch:

type text1.txt >> text3.txt
set /P textusr="Enter your text "
echo %textusr% >> text3.txt
type text2.txt >> text3.txt

This could work, maybe it could miss some LF but that depends on your
text files.

HTH