Thank you for the quick fix, but now I have another problem. I need to be able to switch between active and passive mode, depending on where I connect to my FTP server from. Is there any chance such a function could be implemented? Thanks.