PC Review


Reply
Thread Tools Rate Thread

Append via COPY

 
 
JoJo
Guest
Posts: n/a
 
      31st Jul 2009
Folks:

I have 5 separate PDF files and each is about 300 KB large. I would like to
run a simple COPY
command from the command prompt in order to combine (append) these files
into a single PDF file.

The syntax of the command I used is as follows:
----------------------------------------------------------------------------
---------------------------------
COPY /B /V Part1.pdf /B + Part2.pdf /B + Part3.pdf /B + Part4.pdf /B +
Part5.pdf /B Allparts.pdf /B
----------------------------------------------------------------------------
---------------------------------

The command runs for a short time but the end result is that Allparts.pdf is
no different from part1.pdf

* Can anyone throw some light on this issue ? Why is the command not
running successfully ?


Thanks,
Jon.


 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      31st Jul 2009

"JoJo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Folks:
>
> I have 5 separate PDF files and each is about 300 KB large. I would like
> to
> run a simple COPY
> command from the command prompt in order to combine (append) these files
> into a single PDF file.
>
> The syntax of the command I used is as follows:
> ----------------------------------------------------------------------------
> ---------------------------------
> COPY /B /V Part1.pdf /B + Part2.pdf /B + Part3.pdf /B + Part4.pdf /B
> +
> Part5.pdf /B Allparts.pdf /B
> ----------------------------------------------------------------------------
> ---------------------------------
>
> The command runs for a short time but the end result is that Allparts.pdf
> is
> no different from part1.pdf
>
> * Can anyone throw some light on this issue ? Why is the command not
> running successfully ?
>
>
> Thanks,
> Jon.


The command did run successfully, which you could confirm if you compared
file sizes. However, .pdf files are binary files and not text files. They
have a header and a certain internal structure. When you join two .pdf files
in the manner you did then you're not modifying the header of the first
file. Adobe Reader therefore "thinks" that the file length is the same as
before. You're lucky that Acrobat was still able to read the file!

You will need to buy the full Adobe Acrobat product in order to manipulate
..pdf files.


 
Reply With Quote
 
Tim Meddick
Guest
Posts: n/a
 
      1st Aug 2009
Despite you using the "/b" switch, it would not work because many types of file have
far more complicated 'headers' and 'footers' than the simple start-of-file /
end-of-file characters that a simple binary file posses.

This resulted in Adobe Reader recognising the opening structure of the first file and
then it read the closing structure of the same file - and there it stopped reading.

Notwithstanding that several more files were appended to the end of your first file.

I desperately wanted to "join" two midi files together once.

I had to open them in a binary file editor and learn to recognise where the 'headers'
ended and the 'footers' began.

Then I had to delete the 'footer' of the first file and the 'header' of the second -
only then could I join them together using "copy /b".

It worked, but it did require a lot of effort on my part.

You can, however, join simple text files together with the "copy /b" command, as the
only 'headers' and 'footers' that they posses are the basic start-of-file /
end-of-file characters that the "copy /b" command is designed to strip and relocate.

=

Cheers, Tim Meddick, Peckham, London. :-)




"JoJo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Folks:
>
> I have 5 separate PDF files and each is about 300 KB large. I would like to
> run a simple COPY
> command from the command prompt in order to combine (append) these files
> into a single PDF file.
>
> The syntax of the command I used is as follows:
> ----------------------------------------------------------------------------
> ---------------------------------
> COPY /B /V Part1.pdf /B + Part2.pdf /B + Part3.pdf /B + Part4.pdf /B +
> Part5.pdf /B Allparts.pdf /B
> ----------------------------------------------------------------------------
> ---------------------------------
>
> The command runs for a short time but the end result is that Allparts.pdf is
> no different from part1.pdf
>
> * Can anyone throw some light on this issue ? Why is the command not
> running successfully ?
>
>
> Thanks,
> Jon.
>
>



 
Reply With Quote
 
Rich Pasco
Guest
Posts: n/a
 
      18th Aug 2009
Tim Meddick wrote:

> You can, however, join simple text files together with the "copy /b" command, as the
> only 'headers' and 'footers' that they posses are the basic start-of-file /
> end-of-file characters that the "copy /b" command is designed to strip and relocate.


Actually, "copy /b" doesn't strip or relocate anything. It just
concatenates the files exactly as they are.

Back in the old DOS days, it was customary to end a text file with
a Ctrl-Z character. "Copy /a" (or anything except /b) would strip off
Ctrl-Z from all the files but the last one, so that any application
which stopped reading at a Ctrl-Z would read all the files together
before stopping at the last one.

Nowadays, most applications don't use the Ctrl-Z on text files
anymore, so you don't need the /A option to concatenate them,
and /B works fine for text files without Ctrl-Z's.

- Rich
 
Reply With Quote
 
Tim Meddick
Guest
Posts: n/a
 
      18th Aug 2009
Rich,
My knowledge is seriously rooted in the past and I was, indeed, thinking that
files needed an end-of-file character (0x1A) like in the old days of DOS (where I
still live for much of the time, it seems).

I thankyou for pointing out my error and dragging me into the present-day...

==

Cheers, Tim Meddick, Peckham, London. :-)




"Rich Pasco" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Tim Meddick wrote:
>
>> You can, however, join simple text files together with the "copy /b" command, as
>> the
>> only 'headers' and 'footers' that they posses are the basic start-of-file /
>> end-of-file characters that the "copy /b" command is designed to strip and
>> relocate.

>
> Actually, "copy /b" doesn't strip or relocate anything. It just
> concatenates the files exactly as they are.
>
> Back in the old DOS days, it was customary to end a text file with
> a Ctrl-Z character. "Copy /a" (or anything except /b) would strip off
> Ctrl-Z from all the files but the last one, so that any application
> which stopped reading at a Ctrl-Z would read all the files together
> before stopping at the last one.
>
> Nowadays, most applications don't use the Ctrl-Z on text files
> anymore, so you don't need the /A option to concatenate them,
> and /B works fine for text files without Ctrl-Z's.
>
> - Rich


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COPY / APPEND` jon Microsoft Excel Worksheet Functions 0 10th Feb 2009 03:26 PM
Copy and Append Macro Excel Help! Microsoft Excel Misc 2 7th Apr 2008 05:39 PM
Copy/Paste Append =?Utf-8?B?SWFu?= Microsoft Access External Data 1 12th May 2005 06:01 PM
Append query to copy a row? =?Utf-8?B?TWF1cnkgTWFya293aXR6?= Microsoft Access 4 24th Sep 2004 10:15 PM
how to copy/append bdavis Windows XP General 1 7th Sep 2003 03:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 PM.