PLEASE I NEED THE HELP
I want that if i upload by SSH protocol ,a datafile on wing ftp server,
- a paramfile would be created with the complete path of datafile
and if the name of datafile uploaded has ".filepart" extension, it would be renamed itself without ".filepart" extension
math.randomseed(os.time())
n = math.random(123456789,987654321)
-- Génération du ZFILE ZS
if "%Name" ~= "super_user_tdx_esftp" then
local username = "%Name"
local sessionid = "%ConnectID"
local tempfilepath = "C:/" .. "TRADEXPRESS" .. "/" .. "DATAFILES" .. "/" .. username .. "/" .. "ZS" .. n .. username .. sessionid .. "%ServUploadFiles"
local f = io.open(tempfilepath , "a")
local cpt=0
--
f:write("USERNAME=")
f:write("%Name")
f:write("\n")
--
f:write("LOGNAME=")
f:write(string.sub("%Name",1,string.find("%Name","_") - 1))
f:write("\n")
--
f:write("SUBNAME=")
f:write(string.sub("%Name",string.find("%Name","_") + 1))
f:write("\n")
--
f:write("ACCOUNT=")
f:write("")
f:write("\n")
--
f:write("REMOTE_HOSTNAME=")
f:write("%ClientVersion" )
f:write("\n")
--
f:write("REMOTE_HOSTADDR=")
f:write("%IP")
f:write("\n")
--
f:write("REMOTE_LOGNAME=")
f:write("unknown")
f:write("\n")
--
f:write("DIRECTION=")
f:write("S")
f:write("\n")
--
f:write("TRANSFER=")
f:write("STOR")
f:write("\n")
--
f:write("ZFILE=")
f:write(tempfilepath)
f:write("\n")
--
local thefilepath = "%PathName"
f:write("DATAFILE=")
f:write(thefilepath)
f:write("\n")
--
f:write("STATUS=")
if string.find( thefilepath, ".filepart") then
f:write("KO")
else
f:write("OK")
end
f:write("\n")
--
f:write("#EOF")
f:write("\n")
f:close()
end
But it is not worked very well.