Run LUA script with argument

You can share your Lua Scripts with everybody here.

Run LUA script with argument

Postby sofabeat » Sun May 01, 2011 9:23 pm

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?
sofabeat
 
posts 1
 
joined Sun May 01, 2011 8:56 pm

Re: Run LUA script with argument

Postby FTP » Mon May 02, 2011 3:27 pm

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".
FTP
Site Admin
 
posts 1225
 
joined Tue Sep 29, 2009 6:09 am


Return to Lua scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron