?
Solved

Copy a + b a sys cmd

Posted on 2000-04-12
2
Medium Priority
?
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to useā€¦
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

649 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