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.MakeDir - Create a new directory in 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.

Syntax

value = lp.MakeDir('path');

Description

The lp.MakeDir LUA function creates a new directory in the Windows file system.

Parameters

'path'                        The path and name of the directory

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 directory is created

-1           If not created

nil                 Return nil if an error occurs

 

Example

Example of creation of the c:\newdir directory

value = lp.MakeDir("c:\\newdir");

lp.Print("Result : ",value);

make dir

If we launch the script a second time then we get an error because the directory already exist.

make dir

 

 


www.loriotpro.com