Having trouble writing to a file in a specific directory. I'm using a loop to capture info from multiple devices so the actual filename is represented as a the variable "file"
file = (hostname + '.txt') file = file.lstrip("\r\n") s = open('\\home\\verizon\\backups\\Cisco\\'%file ,'w') s.write(output) s.close()
buran write Nov-13-2020, 08:02 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.