LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.RemoveFile - Remove a file form the Windows file system

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.

Return Values

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);