[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


ftp script

Posted on 2012-09-04
Medium Priority
Last Modified: 2012-09-18
What is an ftp script to send file from one host to another..

Could u tell me at what occasions..
Question by:tomvv
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38365460
Please pay attention to the zones you ask your questions in.  ftp is not an Oracle command so it should really not be asked in an Oracle zone.

ftp us a stand-alone unix command.  It does not need to be part of a script.

>>Could u tell me at what occasions..

When you have a file on one server and you need to get it to another server.

A quick Google will tell you everything you ever wanted to know about this command.
LVL 74

Expert Comment

ID: 38365521
FTP is a file transfer protocol (in fact, that's what the acronym stands for)

most operating systems offer a command line tool to do so.  There are also gui tools to do it.

If you are asking how to do a file transfer via ftp within Oracle, you can do so with the package described here...  example scripts for its use are included

LVL 35

Expert Comment

ID: 38365580
Just want to clarify.  ftp is not a unix command.  It exists on most every operating system.

Technically, it is a protocol, but there is usually a command of the same name.

Some systems do not run the daemon to accept ftp connections as it is less secure than newer protocols.  That is really up to the security policy of the company.
LVL 23

Accepted Solution

David earned 2000 total points
ID: 38366405
Lots of good answers, but my interpretation is that you wanted a sample script.  The file transfer protocol (FTP) pre-dates the world wide web, and it provides the method to transfer one or more ascii or binary objects between two computers.

A good, simple example of the syntax is at http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftp.mspx?mfr=true.  One would execute a batch or shell file that contained the ftp.exe.  On the command line a script file could be specified, using a combination of some 30 commands in sequence.

For example:
> c:/program files/utils/ftp.exe -s: c:/temp/myftp.scr .......

and myftp.scr might look like:
user <somename>
lcd /users/myhome/upload
mput *.*
lcd /users/myhome/download
mget *.*
LVL 16

Expert Comment

ID: 38376878
The ftp "command" is actually a little ftp client program that uses the FTP protocol to transfer files and directory listings to and from an ftp server program.  The ftp server program is usually running on another computer.

People sometimes mistakenly refer to ftp client commands as "FTP commands" for example the client has a command "put" for uploading a file but it actually sends multiple FTP commands to the server like TYPE, PORT and STOR.

The command line ftp client program on windows is out of date in that it can't do passive mode data transfers or SSL encrypted connections.  One good replacement is a supported commerical program named Robo-FTP.  It has a lot more script commands and can even send SQL statements to your database via ODBC.  There are also some shareware scriptable FTP clients.  WinSCP, for example, has basic scripting capabilities.  Sometimes basic scripting is all you need.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses
Course of the Month19 days, 21 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question