?
Solved

Copy a + b a sys cmd

Posted on 2000-04-12
2
Medium Priority
?
258 Views
Last Modified: 2013-11-18
Hi:

I have two files a.txt and b.txt. b.txt has information that I want to append onto a.txt. a.txt is empty (0 kb).

When I issue the cmd "copy a.txt + b.txt a.txt", a.txt now has all of b.txt + an extra character,hex code 1A, appended at the end. b.txt never had this char. a.txt s/b exact copy of b.txt Where is this extra char comming from and how do I stop this behavior?

0
Comment
Question by:Paullkha
2 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 200 total points
ID: 2708601
copy by default does things in "text mode". In this mode the 1a is an end of file character. Coincedentally, such a copy would not copy the whole file, if there were a 0x1a embedded in it.

You can solve all of the that by forcing a binary copy with the /B switch:

copy /B a.txt+b.txt a.txt

0
 
LVL 2

Author Comment

by:Paullkha
ID: 2709122
Actually, after it was adding the extra char, I was forcing a /A copy - wrong logic.

Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question