Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use of XCOPY command to append file

1,554 views
Skip to first unread message

Randy Bunton

unread,
Sep 24, 2008, 8:06:13 PM9/24/08
to
I have a situation where I need to copy multiple files into 1 file so that I
can process the contents. The command that I am trying to use is :
XCOPY C:\EDITPATH\*.DET C:\EDITPATH\REMITT.TXT

When I run this command, I am only getting that last file copied and none of
the other files. It appears that each file is overwriting the destination
file.

Any help in finding out what I am doing wrong will be greatly appreciated.


Michael Bednarek

unread,
Sep 24, 2008, 11:42:13 PM9/24/08
to
On Wed, 24 Sep 2008 20:06:13 -0400, "Randy Bunton" wrote in
microsoft.public.basic.dos:

Use COPY instead.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"

Ethan Winer

unread,
Sep 25, 2008, 10:28:57 AM9/25/08
to
> The command that I am trying to use is :
> XCOPY C:\EDITPATH\*.DET C:\EDITPATH\REMITT.TXT

The way I read this, XCopy copies the first file and names the copy
REMITT.TXT. Then it copies the next file giving it the same name thus
overwriting the first, and so forth. So of course you get only the last
file. :->)

--Ethan

Bob Milutinovic

unread,
Sep 29, 2008, 9:55:34 PM9/29/08
to
"Randy Bunton" <bunt...@charlestoncpw.com> wrote in message
news:uw5NIIqH...@TK2MSFTNGP05.phx.gbl...

FOR %I IN (*.DET) DO TYPE %I>>REMITT.TXT

But this really has nothing to do with DOS-based BASIC
interpreters/compilers, for which this newsgroup was conceived.

- Bob.


0 new messages