Now I understand. There isn't anything to be done about the filename in the incident. I can only suggest perhaps doing something directly with the io library to manipulate the "name" in a file handle, howeverm I don't think this is possible. One workaround would be to (excuse the pseudo code): def get_handle(file_data): return_handle = open(file_data['name'], "wb") with open(file_data['path'], "rb") as fp: return_handle.write(fp.read()) return_handle.seek(0,0) return return_handle def main(): args = demisto.args() entryID = args['entryID'] file_data = demisto.getFilePath(entryID) new_handle = get_handle(file_data) This would temporarily write data to a file named aptly and return the handle you need. This file, though, would only exist throughout the execution of the intergation command.
... View more