> def execute(testpath):
>
> try:
> win32file.CopyFile(os.path.join(testpath, 'test.log'),
> os.path.join('d:\\', 'iTest', 'iDir Simple Test', 'OutputData',
> 'test.log'),
> 1)
> except:
> return 0 #File already exists!
This works for me.
>>> try:
... win32file.CopyFile(os.path.join(testpath,
'test.log'),os.path.join('d:\\', 'iTest', 'iDir Simple Test', 'OutputData',
'test.log'),1)
... print "worked"
... except win32file.error:
... print "failed"
...
failed
>>>
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython