run(by task scheduler using a different user account) a python script on windows and try to delete a file by using os.unlink, but got [Error 5] Access is denied exception.
try:
os.unlink(file_path)
except OSError as error:
logger.error('failed, error: {0}'.format(error))
2014-09-18 03:53:44,023 - error: [Error 5] Access is denied: u'C:\path\test.tgz'