File Transfer Protocol
A List of FTP Commands
|The SimoTime Home Page|
The following information is provided as a reference for the File Transfer Protocol (FTP) commands. This document describes a typical process for an interactive and automated, batch FTP session running on a PC with Windows/XP and connecting to a UNIX system. This process may vary slightly depending on the hardware and software configurations of the local and remote systems.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2016
All Rights Reserved
To start an FTP interactive session type "ftp" from a DOS Command window.
The DOS prompt should be replaced with the FTP prompt. The FTP program is now running on the local system. A connection (or session) to a remote system has not been established.
The help command or ? (question mark) may be executed without being attached to a remote system and will do a print (usually to the screen) of the FTP commands. The following is an example of an FTP Command to display the FTP Help information.
The following is a typical result of the help command running on a PC with Windows.
Commands may be abbreviated. Commands are: ! delete literal prompt send ? debug ls put status append dir mdelete pwd trace ascii disconnect mdir quit type bell get mget quote user binary glob mkdir recv verbose bye hash mls remotehelp cd help mput rename close lcd open rmdir
The following FTP Command will perform the FTP OPEN (make the connection) and display the following messages.
ftp open domain.name Connected to domain.name 220 antigonous FTP server ready. User (domain.name:(none)): User-Name 331 Password required for user-name Password: password 230 User user-name logged in. ftp
The following FTP Command will change the directory on the remote system and display the following message.
ftp> cd /web 250 CWD command successful. ftp
The following FTP Command will find out the pathname of the current directory on the remote system and display the information.
ftp> pwd 257 "/web" is the current directory. ftp
The following FTP Command will set the file transfer mode to ASCII (this is the default for most FTP programs) and display the information.
ftp> ascii 200 Type set to A. ftp
The following FTP Command will copy a file(using ASCII mode) from the local system to the remote system and display the information.
ftp> put d:\simoweb1\filename.txt 200 PORT command successful. Opening ASCII mode data connection for filename.txt 226 Transfer complete ftp
The following FTP Command will set the file transfer mode to BINARY (the binary mode transfers all eight bits per byte and must be used to transfer non-ASCII files). ) and display the information.
ftp> binary 200 Type set to I. ftp
The following FTP Command will copy a file (using BINARY mode) from the local system to the remote system and display the information.
ftp> put d:\simoweb1\filename.zip 200 PORT command successful. Opening BINARY mode data connection for filename.zip 226 Transfer complete ftp
The following FTP Command will exit the FTP environment (same as "bye") and display the information.
ftp> quit 221 Goodbye.
When the preceding FTP Command is finished the DOS prompt will be displayed.C:\>
The preceding is a typical process for an interactive FTP session running on a PC with Windows/XP or Windows/7 and connecting to a UNIX system. This process may vary slightly depending on the hardware and software configurations of the local and remote systems.
The following batch file (UPWIP001.BAT) will start an FTP session and pass the name of a text file (UPWIP001.TXT) to the FTP program. This text file will be processed by the FTP program and each of the statements in the text file will be processed in the sequence they appear.
@echo OFF rem * ******************************************************************* rem * FTPSAME1.CMD - a Windows Command File * rem * This program is provided by SimoTime Enterprises * rem * (C) Copyright 1987-2013 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: firstname.lastname@example.org * rem * ******************************************************************* echo * echo * This batch and text file illustrate the use of FTP to upload an echo * ASCII file and an EBCDIC or Binary file. The UPWIP001.BAT file echo * references UPWIP001.TXT that contains... echo * echo * user echo * password echo * cd /web echo * pwd echo * ascii echo * put d:\simoweb1\cbltxn01.htm echo * binary echo * put d:\simoweb1\cbltxn01.zip echo * quit echo * ftp -s:upwip001.txt www.simotime.com
The following is a listing of the contents of the text file (UPWIP001.TXT).
user password cd /web pwd ascii put d:\simoweb1\cbltxn01.htm binary put d:\simoweb1\cbltxn01.zip quit
The following is a summary of the commonly used FTP Commands.
|A List of FTP Commands|
The DIR command will list the contents of the remote directory.The asterisk (*) and the question mark (?) may be used as wild cards.
|A List of Parameters for the DIR FTP Command|
The following are additional commands that are used when tranferring files between an IBM Mainframe and a Windows or UNIX client system. Also, the following includes commands required when working with files containing variable length records.
|A List of Extended FTP Commands|
This SITE (via the literal or quote command) statement is used at the client system and the LOCSITE command is used at the host system. Both statements are used to transfer a function to the host site. The following is a summary of the commonly used SITE/LOCSITE Commands.
|Parameters used with the LOCSITE Extended FTP Commands|
The following is an example of the LITERAL command and a GET command. The commands are executed at the client and will cause the RDW (Record Descriptor Word) to be included at the beginning of each record of a file with variable length records.
LITERAL SITE RDW
GET host-file-name client-file-name
The following is an example of the LOCSITE command and a PUT command. The commands are executed at the host and will cause the RDW (Record Descriptor Word) to be included at the beginning of each record of a file with variable length records.
PUT host-file-name client-file-name
The following is an example of the LOCSITE command for accessing tape files with variable length recoerds. The command is executed at the host and will cause the RDW (Record Descriptor Word) to be included at the beginning of each record of a file with variable length records.
LOCSITE RDW READTAPEFORMAT=V
PUT host-file-name client-file-name
The purpose of this document is to provide a quick reference for connecting and exchanging information between two systems. This document describes a typical process for an interactive or automated, batch File Transfer Protocol (FTP) session running on a PC with Windows/2000 and connecting to a UNIX system. This process may vary slightly depending on the hardware and software configurations of the local and remote systems.
This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives.
The documentation and software were developed and tested on systems that are configured for a SimoTime environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SimoTime Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SimoTime Services or Technologies please send an e-mail to: email@example.com or call 415 883-6565. We appreciate hearing from you.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.
SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
Explore Sample FTP Scripts and Windows Command Files(FTP) that will transfer files between a Mainframe Host System and a Windows Client System.
Explore the alternatives for transferring data files between systems. This link provides access to a repository of information that includes the transferring and/or sharing of data between Mainframe (ZOS or VSE), Linux, UNIX and Windows Systems.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.
The following links will require an internet connection.
A good place to start is The SimoTime Home Page via Internet Connect for access to white papers, program examples and product information.
Explore The Micro Focus Web Site via Internet Connect for more information about products and services available from Micro Focus.
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
This document was created and is copyrighted and maintained by SimoTime Technologies.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: firstname.lastname@example.org
We appreciate hearing from you.
Founded in 1987, SimoTime Technologies is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
|File Transfer Protocol (FTP), a List of FTP Commands|
|Copyright © 1987-2016
All Rights Reserved
|When technology complements business|