logfile_rm = "C:\\nature-labs\\who\\covid19\\ds3\\gcplog.txt"
excel_rm = "C:\\nature-labs\\who\\covid19\\ds3\\WHO_Vaccination_data.xlsx"

import shutil
import os
import sys

#remove file if exists
def remove_if_exists(removefile):
    try:
        if os.path.exists(removefile):
            os.remove(removefile)
            print ("File removed successfully", removefile)
    except:
        print("Error while deleting file ", removefile)

#remove previous log file

removefile = logfile_rm
remove_if_exists(removefile)

removefile = excel_rm
remove_if_exists(removefile)

