Hi
I am currently using Ignition 8.1.14 and windows server 2019.
I have created button function which create XML File and update it if it is same file.
Is there different function to create a new file in same folder.
When i try to create a new file using System. File. Write File function i am getting error as specified below.
IOError: [Errno 2] File not found - D:\MGILL\WM_25-Feb-2022 11:46:11.xml (The filename, directory name, or volume label syntax is incorrect)
Copy of sample code which is as follow:
Write the xml to a file.
fileName = (‘D:/MGILL/WM_’+ DateTime + ‘.xml’)
if system.file.fileExists(fileName):
system.file.writeFile(fileName, xmlOut)
else:
system.gui.messageBox(“No, it doesn’t exist”)
file = (‘D:/MGILL/WM_’+ DateTime + ‘.xml’ )
if file:
system.file.writeFile(file, xmlOut)
Any suggestions?