Copying Files

Mike C. Fletcher mcfletch at rogers.com
Fri Jun 6 23:25:09 EDT 2003


Using a function is normally refered to as "calling", rather than 
implementing (writing/creating).  This should work:

PythonWin 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) - 
see 'Help/About PythonWin' for further copyright information.
 >>> import shutil
 >>> shutil.copyfile( 'p:\\temp\\a.bmp', 'p:\\temp\\chars\\a.bmp' )
 >>>

Note the use of strings, and escaping of \ characters within those strings.

HTH,
Mike

Stan Cook wrote:

>Can someone give me a clue on using the copyfile function?  I've tried
>implementing it in this fashion without success.
>
>copyfile(d:\work\temp.dbf, d:\w)
>
>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.486 / Virus Database: 284 - Release Date: 5/29/03
>
>
>  
>

-- 
_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/








More information about the Python-list mailing list