Re: Copy multiple files into a single file - xcopy?
- From: "Seahawk60B" <jetranger57b@xxxxxxxxx>
- Date: 15 Mar 2007 09:18:23 -0700
On Mar 14, 8:39 pm, JornyO <Jor...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
What I wrote earlier basically was an example of what I am trying to do. In
the folder C:\Data there are multiple sub-folders (\010101, \010102, \010103,
etc...) that each contain several text files. I can't copy all of the text
files from these subfolders into a single folder (in order to use "copy" in
command prompt) because there are files in the different subfolders with the
same name. What I was trying to do with the xcopy command was copy all of
the contents of the .txt files in the subfolders into a single .txt file
located in C:\.
The command I tried was: xcopy *.txt C:\file.txt /s
This command did in fact copy each text file from the subfolders, but rather
than appending them all into the same file, it just overwrote C:\file.txt
each time it copied one of the text files from one of the subfolders. For
some reason, using the simple command "copy *.txt file.txt" works fine if all
of the source text files are in the same folder. But as I said, I want to
get text files from the subfolders and have them all combined into a single
text file. Thanks for your time so far! The help is greatly appreciated.
"Pegasus (MVP)" wrote:
"JornyO" <Jor...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C9E39C43-2C4D-44D5-B182-ACE0BA5B5751@xxxxxxxxxxxxxxxx
I want to copy multiple text files into a single text file without havingto
have all of the text files in one folder. The problem is that many of thejust
text files have the same name, so I want them to remain in separate
sub-folders. If the text files are all in the same folder, I know I can
use the DOS command: copy *.txt file.txt.
I tried using xcopy *.txt C:\file.txt /s, hoping that all the text filesin
the subfolders of my working directory would all get copied into file
C:\file.txt. But instead, it just overwrote file.txt a couple of thousand
times rather than combining all the files into one big text file.
Any advice?
I think an example would go a long way towards describing
your exact requirements accurately.
Check out the following utility -
http://bluefive.pair.com/txtcollector.htm
.
- References:
- Re: Copy multiple files into a single file - xcopy?
- From: Pegasus \(MVP\)
- Re: Copy multiple files into a single file - xcopy?
- Prev by Date: Re: changing mouse buttons
- Next by Date: Re: installing OEM XP on an old PC
- Previous by thread: Re: Copy multiple files into a single file - xcopy?
- Next by thread: Check out Windows Live OneCare safety scanner
- Index(es):