Run LUA script with argument

You can share your Lua Scripts with everybody here.
Post Reply
sofabeat
Posts: 1
Joined: Sun May 01, 2011 8:56 pm

Run LUA script with argument

Post by sofabeat »

Hello, FTpeople.

I'm trying to run LUA script with argument. The script is running, but doesn't get an argument.

Code: Select all

wftpconsole.exe -u Username -p Password -f myscript.lua ARGUMENT
When I run wftpconsole.exe help , I can see that it seems to get argument. (Or what word "arg" is standing for?)

Code: Select all

Allowed options:
  --help                Show this message
  -u [ --username ] arg Username (Required field)
  -p [ --password ] arg Password (Required field)
  -h [ --host ] arg     Remote host IP address,default is localhost
  -P [ --port ] arg     Remote host port,default is 5466
  -f [ --file ] arg     Parse and execute local Lua <file>
  -s [ --ssl ]          Use SSL connection
When I'm checking myself with lua interpreter it works fine.

Code: Select all

lua.exe myscript.lua ARGUMENT
Can somebody help me with passing argument to lua script, please?
FTP
Site Admin
Posts: 1917
Joined: Tue Sep 29, 2009 6:09 am

Re: Run LUA script with argument

Post by FTP »

I think you should run the Lua script as:

Code: Select all

wftpconsole.exe -u Username -p Password -f myscript.lua
There is no ARGUMENT for "myscript.lua".
Post Reply