27

I need to execute a .lua script using windows command line (cmd). I've got my .lua file in the same folder in which my lua.exe is.

I've tried several ways of running the file but I can't figure out how to do it. =(

(I also have the same script with the extension .out)

HennyH
  • 7,794
  • 2
  • 29
  • 39
matheusesp
  • 313
  • 2
  • 4
  • 6

1 Answers1

22

C:\path\to\lua.exe file_name.lua OR lua file_name.lua if you've set up envrioment variables. If the prior doesn't work, simply drag and drop the file_name.lua onto the lua.exe.

HennyH
  • 7,794
  • 2
  • 29
  • 39
  • Ohh... It's so simple! I was getting errors over and over again, them I've downloaded another .exe and it worked! Thank you! – matheusesp May 22 '13 at 13:32
  • 4
    @matheusesp: If you want to thank him, accept his answer (with the checkmark beside the answer). – Nicol Bolas May 22 '13 at 14:35