From: ckl
Subject: combining files
Date: 
Message-ID: <35D93A91.7C6F55C6@cadservices.nl>
I'm looking for a way to combine binary files into one file, but I see
no way to does this.
Can anyone help me.

From: Barry Margolin
Subject: Re: combining files
Date: 
Message-ID: <%vgC1.13$Gz4.781464@burlma1-snr1.gtei.net>
In article <·················@cadservices.nl>,
ckl  <··········@cadservices.nl> wrote:
>I'm looking for a way to combine binary files into one file, but I see
>no way to does this.
>Can anyone help me.

What do you mean by this?  Merging the files, appending one file to
another, something else?

If you just need to append them, something like this should work:

(defun concatenate-binary-files (file1 file2 output-file element-type)
  (with-open-file (in1 file1
                   :direction :input :element-type element-type)
    (with-open-file (in2 file2
                     :direction :input :element-type element-type)
      (with-open-file (out output-file
                       :direction :output :element-type element-type)
        (loop for byte = (read-byte in1 nil)
              while byte
	      do (write-byte out byte))
        (loop for byte = (read-byte in2 nil)
              while byte
	      do (write-byte out byte))))))

Of course, it may be simpler to do this from the OS; if you're on Unix,
"cat file1 file2 > output-file" will do it.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
From: Mike McDonald
Subject: Re: combining files
Date: 
Message-ID: <tk1D1.23508$MV.16756042@news.teleport.com>
In article <···················@burlma1-snr1.gtei.net>,
	Barry Margolin <······@bbnplanet.com> writes:
> In article <·················@cadservices.nl>,
> ckl  <··········@cadservices.nl> wrote:
>>I'm looking for a way to combine binary files into one file, but I see
>>no way to does this.
>>Can anyone help me.
> 
> What do you mean by this?  Merging the files, appending one file to
> another, something else?
> 

> Of course, it may be simpler to do this from the OS; if you're on Unix,
> "cat file1 file2 > output-file" will do it.
> 

  And of course, that may not give you a valid binary file for whatever uses
them. (Just thought I'd better state the obvious.)

  Mike McDonald
  ·······@mikemac.com
From: Rainer Joswig
Subject: Re: combining files
Date: 
Message-ID: <joswig-2108980143400001@194.163.195.67>
In article <·······················@news.teleport.com>,
·······@mikemac.com wrote:

> In article <···················@burlma1-snr1.gtei.net>,
>         Barry Margolin <······@bbnplanet.com> writes:
> > In article <·················@cadservices.nl>,
> > ckl  <··········@cadservices.nl> wrote:
> >>I'm looking for a way to combine binary files into one file, but I see
> >>no way to does this.
> >>Can anyone help me.
> > 
> > What do you mean by this?  Merging the files, appending one file to
> > another, something else?
> > 
> 
> > Of course, it may be simpler to do this from the OS; if you're on Unix,
> > "cat file1 file2 > output-file" will do it.
> > 
> 
>   And of course, that may not give you a valid binary file for whatever uses
> them. (Just thought I'd better state the obvious.)
> 
>   Mike McDonald
>   ·······@mikemac.com

ACL can do it.

For MCL use the function FASL-CONCATENATE from
ccl:examples;fasl-concatenate.lisp .