lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


brian@arandasys.com wrote:
execute("batch c:\folder1 c:\folder2")

batch being the name of the batch file to execute and c:\folder1 & c:\folder2 being the two arguments passed.

Is this the correct/best way to do this?

The backslashs within the double quotes are going to get you.
It's better to use [[ ... ]] to quote string containing DOS path names.

Lua 4:  execute[[ batch c:\folder1 c:\folder2 ]]
Lua 5:  os.execute[[ batch c:\folder1 c:\folder2 ]]

- Peter Shook