You are on page 1of 2

3/20/2019 Wing FTP Software - Forum - LUA script to run CMD

Home Download Purchase Support Forum

Board index ‹ Wing FTP Server ‹ Lua scripts

FAQ Register Search Login

LUA script to run CMD


Post a 4 posts • Page 1 of 1
reply
Search this topic… Search

LUA script to run CMD tmays

by tmays » Fri Jan 25, 2013 4:18 pm 4

I am wanting to see if I can use the onfileupload event to trigger a test.cmd or test.bat file Fri Jun 15,

2012 3:59 pm
I don't want to use the execute program part, I want to be able to add to the LUA script as I
need to.

For example. I want it to run when a file is uploaded in folder1 run test.cmd

Re: LUA script to run CMD FTP


Site Adm in
by FTP » Fri Jan 25, 2013 6:08 pm
1627
Yes, you can execute an external program like this: os.execute("c:/test.bat")
Tue Se p 29,

2009 6:09 am

Re: LUA script to run CMD tmays

by tmays » Mon Jan 28, 2013 5:08 pm 4

Ok I can get the cmd process to start but does nothing that I can see. I have a .bat file that
Fri Jun 15,
runs a simple code that runs PSexec to run a script on a remote server.
2012 3:59 pm

C:\Windows\System32\PsExec.exe \\10.0.1.77 -d -u domain\User -p Password "C:\test2.bat"

I tried os.execute ("c/test.bat")

and it only starts PSexec but does not run anything further?

Any thoughts? or other options to get this to work?

maybe start cmd and pass the commands I want it to run?

Re: LUA script to run CMD FTP


Site Adm in
by FTP » Thu Jan 31, 2013 2:16 pm
1627
Yes, because Wing FTP Server is running as Windows service by the default, it can run
program, but it can't show the GUI of that program, you can disable the "Wing FTP Server"

https://bbs.wftpserver.com/viewtopic.php?f=6&t=2920 1/2
3/20/2019 Wing FTP Software - Forum - LUA script to run CMD

service first, and then start Wing FTP Server by double-clicking like other applications. Tue Se p 29,

2009 6:09 am

Display posts from previous: All posts Sort by Post time Ascending Go

Post a 4 posts • Page 1 of 1


reply

Return to Lua scripts Jump to: Lua scripts Go

WHO IS ONLINE
Users browsing this forum: No registered users and 1 guest

Switch to m obile style

Board index The team • Delete all board cookies • All times are UTC

Powe re d by phpBB © 2000, 2002, 2005, 2007 phpBB Group

https://bbs.wftpserver.com/viewtopic.php?f=6&t=2920 2/2

You might also like