lua-users home
lua-l archive

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




On Wed, Sep 9, 2009 at 8:55 AM, Peter Cawley <lua@corsix.org> wrote:
If you're entering "cmd.exe /K lua.exe" into Start-.Run, then entering
just "lua.exe" should also work.

On Wed, Sep 9, 2009 at 8:45 AM, Robert G.
Jakabosky<bobby@sharedrealm.com> wrote:
> Type this Lua code to execute that Lua script:
> dofile("C:\\a\\ScriptingLanguageSupport\\Lua2.lua")

Alternatively:

dofile[[C:\a\ScriptingLanguageSupport\Lua2.lua]]

The Windows backslashes are a vestige that is on it's way out.
Just use forward slashes everywhere in Lua! Everything apart from the Command Prompt (cmd.exe) understand proper file names these days.

dofile "C:/a/ScriptingLanguageSupport/Lua2.lua"

Robby

PS The only place I ever have to use backslashes for pathnames in Windows is when constructing a command line for os.execute(). But there you also have the lovely task of getting your quoting right and everything is suddenly difficult.