6

I am using Python 3.5.

I am using shutil.move(src, dest) to move a file between 2 different file systems.

As I understand cross-device link error is raised by OS because it can't create hard links across 2 different file systems, which is fine.

But as per documentation, shutil.move can move files by copying it to destination and then deleting it at the source.

My exception further says that the exception is because of os.rename that is internally called on line 538 of in shutil.move source code.

Anyone knows how to make shutil.move work?

I read tons of post suggesting shutil.move would definitely work to copy files between 2 file systems, including the documentation .

pranav3688
  • 694
  • 1
  • 11
  • 20
  • 2
    Show your code! – Marichyasana Apr 17 '17 at 22:35
  • What OS? What are the file systems? (e.g. FAT, NTFS, HFS?) – Anthony Kong Apr 18 '17 at 00:15
  • its Suse Linux ... @Marichyasana the code is not complicated, for testing I wrote a simple script with a simple shutil.move statement and 2 inputs through command line...same error for that! – pranav3688 Apr 18 '17 at 16:43
  • 1
    I'm sure the developers of shutil tested "not complicated" cases. If you show your code I can try it on my laptop and check the error codes etc. Are you using full path.name? I have windows 10. – Marichyasana Apr 19 '17 at 20:40
  • Possible duplicate of [OSError: \[Errno 18\] Invalid cross-device link](https://stackoverflow.com/questions/42392600/oserror-errno-18-invalid-cross-device-link) – sophros May 15 '19 at 12:29

0 Answers0