diff --git a/bin/mv-to-docs b/bin/mv-to-docs index e958080..263d933 100755 --- a/bin/mv-to-docs +++ b/bin/mv-to-docs @@ -6,6 +6,7 @@ Move a document to the correct documents folder import filecmp import os import re +import shutil import sys from datetime import date @@ -64,7 +65,8 @@ if __name__ == "__main__": if not os.path.isfile(new_file_path): print "Moving file '%s' to '%s'" % (file_name, new_file_path) - os.rename(file_name, new_file_path) + shutil.copyfile(file_name, new_file_path) + os.unlink(file_name) else: if filecmp.cmp(new_file_path, file_name): print "Two files already exist and are same: '%s' and '%s'" % \