FTP

P

Philip Pratt

Hi,
I'm a complete novice to Ruby, but I would like to write an FTP server
to collect the files from my computer (internet connected) and copy them
to my server nightly. My server is a Ubuntu Linux setup with FTP and
blah. Please help me with this?
 
P

Philip Pratt

Jeremy said:
Do you need to do any programming at all? The NcFTP client at
http://www.ncftp.com/ncftp/ can recursively download directories from
an FTP server to the local machine. I have used it to do that myself.
Is that not enough? Not that I want to put you off Ruby programming,
but it doesn't seem necessary in this case.

Regards,

Jeremy Henty

I would like to do this as a technical excercise first of all, plus I
want it to do specific things at certain times like upload all files in
a folder at 9PM every night, etc plus I want it to run from my Ubuntu
server.
 
M

Marc Heiler

plus I want it to do specific things at certain times like upload all
files in a folder at 9PM every night

This is not so complicated.

First you should write a simple FTP "client" that connects to your
host. This is quite trivial, i.e.

x = Net::FTP.new('ftp.members.a1.net')
x.login('your_name','your_password')

Just look at the FTP class in ruby.

Once you can upload files, you can let this script run
at fixed times. One way would be with cron, or with
ruby daemons http://rubyforge.org/projects/daemons/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,823
Latest member
Nadia88

Latest Threads

Top