Lisp HUG Maillist Archive

Copying a file ?

How do I copy a file in Lispworks? I am on XP, so I thought something like 

(win32:CopyFileEx "c:\\Foo1.jpg" "c:\\Foo2.jpg" nil nil ...)

Which it obviously doesn't like, because it seems to lack CopyFileEx in the 
Win32 package but I saw no command for copying a file.

Thanks,

William



Re: Copying a file ?

On Thu, Aug 7, 2008 at 5:09 PM, William Proffitt <Jacobite1607@gmail.com> wrote:
>
> How do I copy a file in Lispworks? I am on XP, so I thought something like
>
> (win32:CopyFileEx "c:\\Foo1.jpg" "c:\\Foo2.jpg" nil nil ...)
>
> Which it obviously doesn't like, because it seems to lack CopyFileEx in the
> Win32 package but I saw no command for copying a file.
>
> Thanks,
>
> William

It's not hard to write such a function yourself (open input file, open
output file, read from input, write to output).

Googling for "copy file" "common lisp" will return several possible
implementations, for example http://www.weitz.de/cl-fad/

Carlos


Re: Copying a file ?

How about just ccl::copy-file

Mika

On 7.8.2008, at 17:09, William Proffitt wrote:

>
> How do I copy a file in Lispworks? I am on XP, so I thought  
> something like
>
> (win32:CopyFileEx "c:\\Foo1.jpg" "c:\\Foo2.jpg" nil nil ...)
>
> Which it obviously doesn't like, because it seems to lack CopyFileEx  
> in the
> Win32 package but I saw no command for copying a file.
>
> Thanks,
>
> William
>

Dr. Mika Kuuskankare
Researcher
Centre for Music & Technology
Sibelius Academy

Henkilökohtainen postiosoite/Personal post address
PL 342 - PO Box 342
FIN-00121 Helsinki, FINLAND
Tel: +358 (0)40 5415 233
Skype: mkuuskan
personal home page: www.siba.fi/~mkuuskan
project home page: www.siba.fi/PWGL





Re: Copying a file ?

I have used function copy-file in file
http://darcs.informatimago.com/darcs/public/lisp/common-lisp/file.lisp

Lauri

On Thu, Aug 7, 2008 at 6:09 PM, William Proffitt <Jacobite1607@gmail.com> wrote:
>
> How do I copy a file in Lispworks? I am on XP, so I thought something like
>
> (win32:CopyFileEx "c:\\Foo1.jpg" "c:\\Foo2.jpg" nil nil ...)
>
> Which it obviously doesn't like, because it seems to lack CopyFileEx in the
> Win32 package but I saw no command for copying a file.
>
> Thanks,
>
> William
>
>
>


Re: Copying a file ?

"Chun Tian (binghe)" <binghe.lisp@gmail.com> writes:

> P.S. anyone knows where the name "CCL" come from? Seems many CLs has  
> this package name (Clozure, Allegro, ...)

I think it was originally used by Coral Common Lisp, which became
Macintosh Allegro Common Lisp, which became Macintosh Common Lisp,
which became OpenMCL, which became Clozure Lisp :-)

At least I remember that the first version of MACL had this package,
and I thought that was a heritage from CCL.
-- 
  (espen)


Updated at: 2020-12-10 08:42 UTC