Re: [Errno 18] Invalid cross-device link using os.rename

2005-02-16 Thread JustScott
Thanks, Jeff. I appreciate the input. I just stuck with os.system('mv %s %s'). Seems to work fine. On Mon, 14 Feb 2005 18:31:18 -0600, Jeff Epler <[EMAIL PROTECTED]> wrote: > mv is a surprisingly complex program, while os.rename is a wrapper > around rename(2) which is probably documented on yo

Re: [Errno 18] Invalid cross-device link using os.rename

2005-02-14 Thread Jeff Epler
mv is a surprisingly complex program, while os.rename is a wrapper around rename(2) which is probably documented on your system to return EXDEV under these circumstanes. os.xxx is generally a fairly thin wrapper around what your OS provides, and inherits all the "gotchas". For some activities, os

Re: [Errno 18] Invalid cross-device link using os.rename

2005-02-14 Thread Fredrik Lundh
Scott Whitney wrote: > os.rename(oldName,newName) gives: > > OSError: [Errno 18] Invalid cross-device link > > mv from the shell works fine. > > This is Python 2.2.3 from RedHat 9.0. > > Any suggestions (other than os.system('mv %s %s')?) catch exception and copy if error == errno.EXDEV. (this i

[Errno 18] Invalid cross-device link using os.rename

2005-02-14 Thread Scott Whitney
oldName=/backup/backups/data/WWW_httpd.conf_backups/20050204.httpd.conf newName=/backup_old/data/WWW_httpd.conf_backups/20050204.httpd.conf os.rename(oldName,newName) gives: OSError: [Errno 18] Invalid cross-device link mv from the shell works fine. This is Python 2.2.3 from RedHat 9.0. Any s