LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.
value = lp.RemoveFile('filename');
The lp.RemoveFile LUA function remove a file form the Windows file system.
'filename' The file name to delete
Warning ! If you want to use the \ character in the path ypu should use the \\ instead. The \ character is use for escape sequence only in LUA.
value A boolean value of the status
0 If the file is delete
-1 If not deleted
nil Return nil if an error occurs
Deletion of c:\testback.txt from our file system
value = lp.RemoveFile("c:\\testback.txt");
lp.Print("Result : ",value);