def movetree(src, dst):
try:<EOL><INDENT>shutil.move(src, dst)<EOL><DEDENT>except:<EOL><INDENT>copytree(src, dst, symlinks=True, hardlinks=True)<EOL>shutil.rmtree(src)<EOL><DEDENT>
Attempts a move, and falls back to a copy+delete if this fails