Ariba,
You may want to try and implement the FTP protocol. This is nice to use since it eliminates the need for your scripts and it uses the built in functionality of the engine, something I’m big on. If I have a choice, I like to use the functionality we paid for before I write a custom solution.