moving files across devices

Batista, Facundo FBatista at uniFON.com.ar
Thu Oct 28 17:40:19 EDT 2004


[Matt Price]

#- I'm trying to move files across devices on my linux box.  Here's what
#- I had:  
#-     os.rename(sFileName, dir + newName) 
#- which gives:
#- 
#- Traceback (most recent call last):
#-   File "/usr/local/scripts/sort_mp3s.py", line 68, in ?
#-     localSort(i, defaultSaveDir)
#-   File "/usr/local/scripts/sort_mp3s.py", line 34, in localSort
#-     os.rename(sFileName, dir + newName)
#- OSError: [Errno 18] Invalid cross-device link
#- 
#- ok, so that doesn't work.  is there another method?

What are the values of sFileName, dir, and newName (show them here not with
str() but with repr()).

Also, what happens if you try to move it with mv directly from the shell?

Regards,

.	Facundo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041028/9571ea0a/attachment.html>


More information about the Python-list mailing list