concatenate files...

P

Paul H

Back in DOS days I could concatenate text files without using a third party
tool. Can I do this with XP, Vista, or W7? TIA, Paul
 
T

Tim Slattery

Paul H said:
Back in DOS days I could concatenate text files without using a third party
tool. Can I do this with XP, Vista, or W7? TIA, Paul

Yes, the same way you did before:

copy file1.txt + file2.txt fileboth.txt

Type

copy /?

at a command prompt to find out all about the copy command.
 
J

John John - MVP

Paul said:
Back in DOS days I could concatenate text files without using a third
party tool. Can I do this with XP, Vista, or W7? TIA, Paul

At the Command Prompt with the Copy command:

copy file1+file2+file3 newfile.txt

John
 
P

Pegasus [MVP]

John John - MVP said:
At the Command Prompt with the Copy command:

copy file1+file2+file3 newfile.txt

John

This works fine for text file (as your example suggests) but for binary
files the /b switch is required:

copy /b file1+file2+file3 newfile.bin
 
P

Paul H

Thank you both. I should have known that. I do have a Command Prompt icon
on my desktop because I use various DOS commands occasionally.

Now, since I have 50 or 60 or more files to combine into one, I need some
DOS trick to automatically create the list. With that many files, I will
probably have to do 2 or 3 passes, or the command string will be too long.
Any suggestions?
 
M

Mint

Thank you both.  I should have known that.  I do have a Command Prompt icon
on my desktop because I use various DOS commands occasionally.

Now, since I have 50 or 60 or more files to combine into one, I need some
DOS trick to automatically create the list.  With that many files, I will
probably have to do 2 or 3 passes, or the command string will be too long..
Any suggestions?


Yes, the same way you did before:
copy file1.txt + file2.txt  fileboth.txt

copy /?
at a command prompt to find out all about the copy command.

This group can help you with a batch file.

Andy

alt . msdos . batch . nt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top