If the client sends RETR somefile.ext, you NEED a file somefile.ext in the current dir or ioFTPD won't be able to send it. You can't tell io to send some other file instead of the one asked in the RETR command.
CWD /
RETR somedir.zip
-> PRE RETR = ..\scripts\zipitup.bat gets called with RETR somedir.zip in parameter
-> produce a somedir.zip file in /
File is transfered
-> OnDownloadComplete = ..\scripts\cleanit.bat gets called with the filename in parameter
-> deletes the file
Same should be done OnDownloadFailed, in case the person doesn't retry the transfer. You would be left with a .zip on your /...
|