by FTP » Mon Aug 27, 2012 7:01 am
Hi,
You can use lua script in the event "OnDirCreated". Here are some hints:
User the variable "%LastDir" will get the physical path of the folder you created. like: C:/FTP/Sinha/newfolder
Then Q2 is simple.
Q1 maybe a little complex. You can use c_GetUser to get the user information, then add a subdir rule and use c_AddUser to overwrite the user's exist settings.
local user = c_GetUser("%Domain", "%Name")
for k,v in pairs(user) do
if type(v) == "boolean" then
if v == true then
user[k] = 1
else
user[k] = 0
end
end
end
//add a subdir rule here, this parameter is a table
c_AddUser("%Domain",user.username,user.password,user.protocol_type,..............)
Please try to complete it.