Page 1 of 1

Run LUA script with argument

Posted: Sun May 01, 2011 9:23 pm
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?

Re: Run LUA script with argument

Posted: Mon May 02, 2011 3:27 pm
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".