Moving Files on the Server?

Hi-

Say I wanted to move a file from /public/images to /someotherfolder.

How would I do this with Rails?

Thanks.

Is this a difficult problem? Why can I not do:

FileUtils.cp('file1, ‘file2’)? - Even thought the files exist, it
tells me that they do not.

Because you’re trying to access them in relation to the file that you’re
running it from. If you’re thinking that they’re in public, try
“#{RAILS_ROOT}/public/file1”.

On Dec 11, 2007 11:59 PM, pete [email protected] wrote:

How would I do this with Rails?

Thanks.


Ryan B.