ftp script

Posted on 2012-09-04
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 76

    Expert Comment

    by:slightwv (䄆 Netminder)
    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 73

    Expert Comment

    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 34

    Expert Comment

    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

    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  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

    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

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Suggested Solutions

    Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
    Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
    This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now