ajkis / scripts

Ajki's scripts & guides
https://ajkis.github.io/scripts/
324 stars 91 forks source link

Errors with movie-tv2folder #50

Open kmickeletto opened 6 years ago

kmickeletto commented 6 years ago

Getting some strange errors when running this script. Seems to work fine on TV shows but not on movies.

files2folders.py: movie: /share/plexmedia/plexmedia/Movies/Boy, The (2016).mkv -> /share/plexmedia/plexmedia/Movies/Boy, The (2016)/Boy, The (2016).mkv files2folders.py: OS error: [Errno 18] Invalid cross-device link - retrying files2folders.py: OS error: [Errno 18] Invalid cross-device link - retrying files2folders.py: OS error: [Errno 18] Invalid cross-device link - aborting Ubuntu 16.04, running under root context.

ajkis commented 6 years ago

Hmm this could happen if source and destination are not on the same file system.

You could try to modify script to use import shutil

and change my_rename to use shutil.move(src, dst) instead of os.rename(src, dst)

p.s. I did not test it so careful