move File in LUA

Please post here if you have problems in using Wing FTP Server.

move File in LUA

Postby Curtis Newton2 » Wed Oct 12, 2011 10:24 am

Hi,

I try to move files when a user logs on. My script is:

Code: Select all
if ("%Name" == "uploader") then
   mv C:\ftproot\Users\uploader\uploads\*.* C:\ftproot\Users\uploader
end


But this do not compile. Where is the error?

C.
Curtis Newton2
 
posts 1
 
joined Tue Oct 11, 2011 7:53 am

Re: move File in LUA

Postby FTP » Sun Oct 16, 2011 2:12 pm

If you are running Windows system, maybe you can use the following lua script:

Code: Select all
if ("%Name" == "uploader") then
   local cmd = "move /y \"C:\\/ftproot\\/Users\\/uploader\\/uploads\\/*\" \"C:\\/ftproot\\/Users\\/uploader\""
   os.execute(cmd)
end
FTP
Site Admin
 
posts 1215
 
joined Tue Sep 29, 2009 6:09 am


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron