Solved

Copy a + b a sys cmd

Posted on 2000-04-12
2
219 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now