Solved

Copy a + b a sys cmd

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Super Scope, DHCP 5 96
How to learn Linux? 10 86
Resolve Dependency Issues 4 87
placing a checked in the checklistbox based on the value in database table. 3 47
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…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

730 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