andrewning / sortphotos

SortPhotos is a Python script that organizes photos and videos into folders using date/time information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move doesn't work cross devices

AndreasTusche opened this issue · comments

When invoking your script with a source and destination on different hard drives and trying to 'move' instead of copying, then it bails out with the following error. Could you please consider to catch this error, fail back to copying the files and, if that successfully was done, remove the source files? Yes, I could do this manually but would like to use your suggested automation.

File "sortphotos.py", line 273, in
args.move, not args.keep_duplicates, args.ignore_exif, args.day_begins)
File "sortphotos.py", line 230, in sortPhotos
os.rename(src_file, dest_file)
OSError: [Errno 18] Cross-device link