Copying Files

Joe Francia usenet at
Sat Jun 7 07:55:17 CEST 2003

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)

Well, since you didn't actually mention the error you're getting (always 
a better idea than simply saying "It doesn't work"), I'll take a wild 
guess and say it's the lack of quotes surrounding the filenames that's 
causing you problems.  Try this instead:

copyfile(r'd:\work\temp.dbf', r'd:\w')

More information about the Python-list mailing list