I suggest to use 'shutil.move' instead of a combination of copytree and rmtree.