[Pythonmac-SIG] How to copy files on the Mac via Python?

JoanCarles p Casasín joanca@typerware.com
Fri, 16 Jun 2000 23:36:59 +0200


At 16/6/00 22:12 Michael Haensel wrote:

>I'm trying to set up a web site (using Personal Web Sharing, of all
>things! :). I'm going to have several rotating picture galleries, and
>would like to create a Python/TkInter script to assist with the creation
>of the HTML and assembling the pictures in the needed directories. How
>do I copy the .jpg file from the source directory into the web page's
>directory? In UNIX this wouldn't be too tricky, but with the lack of a
>command line on the Mac it's non-obvious. I suppose I could always just
>create the file manually and copy byte-by-byte, but that seems a tad
>inefficient.

Don't know if this will solve your problem exactly, but while better ways 
are coming...
******
import findertools

file = "Rusty:Desktop Folder:bono6.pdf"
destdir = "Rusty:Desktop Folder:GRRR# 6"

findertools.copy(file, destdir)
******

-> jc, tw®