I am using the net-sftp gem to download a file to memory:
sftp = Net::SFTP.start('ftp.myapp.com','user_name', :password => 'password')
records = sftp.download!("luigi/List.csv")
I then need to move my file, located remote at luigi/List.csv
and rename it.
I want to move it here:
"luigi/archive/List_#{Time.now}.csv"
I would then like to delete the original file, located at luigi/List.csv
.
How can I use ruby 2.0.0 and rails 4.0.0 to move, rename, and delete a file on my FTP site?