Re: [Tutor] using os module on windows

2008-02-21 Thread Tim Michelsen
> Delete, then copy. Or use rsync instead of Python... Yes, I ended up writing a small *.bat file that uses unison for sychronization. I still do not understand why I got these permission errors when using the python script. Thanks for the help. ___

Re: [Tutor] using os module on windows

2008-02-20 Thread Kent Johnson
Timmie wrote: > Which command do you recommend if the destination already exists? > I'd like to overwrite or sychronise a local with a remote directory and > therefore the destinations files already exist. Delete, then copy. Or use rsync instead of Python... Kent _

Re: [Tutor] using os module on windows

2008-02-20 Thread Timmie
Thanks for your reply! > The destination path should not already exist, it should end with the > directory you want to create. Did you read the docs for copytree()? They > say, "The destination directory, named by dst, must not already exist; > it will be created as well as missing parent direc

Re: [Tutor] using os module on windows

2008-02-20 Thread Kent Johnson
Timmie wrote: > ## config ## > source = 'C:/my/local/directory' > dest = 'Z:/my/network/drive' > ## start action > #os.remove(dest) > > ## error output > Traceback (most recent call last): > File "test_os_on_win", line 14, in > os.remove(dest) > WindowsError: [Error 5] Zugriff verw

[Tutor] using os module on windows

2008-02-20 Thread Timmie
Dear list, I have some problems using the os module on windows. I kindly ask you do give me advice why os.remove and os.shutil fail here: ### using remove ## #!/usr/bin/env python # -*- coding: utf-8 -*- import shutil import os ## config ## source = 'C:/my/local/directory' dest = 'Z:/my