Read and write files from external FTP server I'm looking for a way to add (S)FTP support to my Drupal Commerce website.  

It's rather simple. Once every night, a cron job should get all the files from the (S)FTP, process them and place other files back on the server. That's it :)

It's a store and all the products, customers and other data come from a different system. So the Feeds module should connect to the FTP and process the files.
But it looks like there is no decent FTP module around. I've looked into the Backup and Migrate, Storage API, Order FTP Export and Save to FTP, but nothing really met my requirements. 

So is there an easy way to connect to an (S)FTP server and exchange files?
I think you better face this problem using system commands that adding FTP support to the Drupal stack.

For this you can use:

1) standard FTP. You can read here how to automate FTP commands from a bash script:
http://www.stratigery.com/scripting.ftp.html

2) SFTP, FTP over SSH. If you can use SSH public key authentication this is the best way as you only will have to exec this command every day:


scp your-remote-user@your-remote-server:/path/to/files/* /local/dir/for/files


Once your files are copied locally you only have to process them with Feeds.

You can even use PHP exec and launch the script that retrieves your data from the Drupal Cron.