Computing.Net > Forums > Unix > automate ftp

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

automate ftp

Reply to Message Icon

Name: NGC
Date: October 28, 1999 at 23:40:40 Pacific
Comment:

Any idea on how to automate ftp login from unix to unix OS? Need this function very badly.

thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Anthony
Date: November 1, 1999 at 05:27:36 Pacific
Reply:

Hello,

What it sounds like you need is a .netrc file in your home directory like the following example:

machine dest_machine login root password mypass macdef init
ascii
get myfile
quit

You need a blank line at the end.

I hope this helps.

Anthony.


0

Response Number 2
Name: Sisiro .
Date: September 15, 2000 at 09:58:58 Pacific
Reply:

.netrc is one way
Another way of doing this
is like this:
-----

ftp -o << !
user
password
put
get
.
.
whatever you want to do>
.
.
bye
!
---------------------
You can put it in a loop in a script
to ftp to multiple sites.

Be sure that the bang sign (!) at the
end starts at the first column.

enjoy,
sisiro.


0

Response Number 3
Name: Sisiro.
Date: September 15, 2000 at 10:04:34 Pacific
Reply:

Looks like my previous post was not posted
correctly. Here is it agn:

------
.netrc is one way
Another way of doing this
is like this:
-----

ftp -o ftpsitenamehere << !
user usernamehere
password passwdhere
put filenametoupload
get filenametodownload
.
.
other ftp commands depending on
whatever you want to do
.
.
bye
!
---------------------
You can put it in a loop in a script
to ftp to multiple sites.

Be sure that the bang sign (!) at the
end starts at the first column.

enjoy,
sisiro.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


UNIX serial port access o... Need a driver for crystal...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: automate ftp

Automated FTP www.computing.net/answers/unix/automated-ftp/1434.html

automating ftp process www.computing.net/answers/unix/automating-ftp-process/2386.html

FTP in Unix www.computing.net/answers/unix/ftp-in-unix/1828.html