Thank you both for your very useful support. I have found the form extension aftersubmit hook, which looks pretty much what I need. I will build the directory structure as you suggest and test. The redirect post processor may be very useful also.