in reply to need to ftp file

Can you share the directory the file is on and access it with Samba from the linux box? This will allow your code to be simpler; of course, it adds work to the admin and may not be an option at all.