Solved

Copy a + b a sys cmd

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
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…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 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

12 Experts available now in Live!

Get 1:1 Help Now