Page 1 of 1

move File in LUA

Posted: Wed Oct 12, 2011 10:24 am
by Curtis Newton2
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.

Re: move File in LUA

Posted: Sun Oct 16, 2011 2:12 pm
by FTP
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