Deleting files before replace to avoid overwrite prompt.
Code tidy.