lua-users home
lua-l archive

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


In article
<9034825D2909FB4E96D539B3DE2E7E2AEB4CBD72@E2010-MBX03.exchange2010.nl>, Thijs
Schreijer <thijs@thijsschreijer.nl> wrote:


> > -----Original Message----- From: lua-l-bounces@lists.lua.org
> > [mailto:lua-l-bounces@lists.lua.org] On Behalf Of Michael Gerbracht Sent:
> > maandag 23 juni 2014 8:19 To: lua-l@lists.lua.org Subject: os.execute
> > with filename and argument containing spaces
> > I would like to use os.execute() to run an .exe file with a path as
> > argument. I tried the following:
> > 
> > path = [["C:\program files\lua\lua.exe" "C:\Users\name
> > surname\test.lua"]] print(path) os.execute(path)

> There is some weird exception in the Windows command processor, in which
> case it removes the outer quotes. So only the inner quotes remain, and then
> it fails.

> Try this: path = [[type NUL && "C:\program files\lua\lua.exe"
> "C:\Users\name surname\test.lua"]]

Ok, thank you very much, this indeed works!

Michael