Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

June 13, 2001 12:00 AM

Essential FTP Commands

Windows IT Pro
InstantDoc ID #21193
Rating: (6)
Build your file-transfer arsenal

FTP is an important TCP/IP utility that lets you transfer files between systems. One of FTP's most compelling features is its compatibility with many different remote hosts: You can transfer files between remote Windows 2000, Windows NT, and UNIX systems, and even IBM hosts such as the AS/400. To start the text-based FTP utility that's supplied with Win2K and NT, simply enter ftp at the command prompt.

As you begin using the FTP shell, you'll quickly find that the following FTP commands are essential.

10. Help (or ?)—You can issue many FTP commands in multiple ways. Help and the question mark character (?), for example, perform the same function. If you're new to FTP, Help—which displays a list of all the supported FTP commands—is the command to start with. To obtain a brief description of a command, enter ? followed by the command name:

ftp>? open

9. Open—To start an FTP session, you typically use the Open command to connect to a specified FTP server. (The FTP service must be running on the remote host.) After you issue the Open command, the system prompts you for a user ID and password. Many FTP servers let you use an anonymous user ID and blank password to log on. To open a connection to a system named teca2, enter

ftp>open teca2

8. Quit (or Bye)—The Quit command ends any open sessions and exits the FTP shell:

ftp>quit

(To end an open session without terminating the FTP shell, use the Close command.)

7. Pwd—The Pwd command displays the directory that your FTP session is currently connected to on the remote host:

ftp>pwd

6. Ls—The Ls command displays a list of the files and subdirectories that reside in the remote system's current directory. Ls helps you access remote files:

ftp>ls

5. Cd—If the file you're looking for isn't in the remote system's current directory, you can use the Cd command to change directories. If you're connected to a UNIX system, you'll typically need to use a forward slash to identify the remote directory (in this case, the /downloads directory):

ftp>cd /downloads

4. Lcd—The Lcd command changes the current directory on the local system. The current directory is the default location to which the system will write any retrieved files. To change the current local directory to C:\temp, enter

ftp>lcd C:\temp

3. Bin (or Binary)—By default, FTP transfers files in ASCII mode, which is fine for text files. However, to transfer executable and .zip files, you need to use Bin to set the transfer type to binary:

ftp>bin

(Use the Ascii command to set the transfer type back to ASCII.)

2. Put (or Send)—Use the Put command when you want to copy a local file to the remote host's current directory. To send a file named localfile.txt in the C:\temp directory to a remote system, enter

ftp>put C:\temp\localfile.txt

1. Get (or Recv)—You use Get to download files from Internet hosts (or other remote hosts) to the local system's current directory. To retrieve a file named remotefile.txt, enter

ftp>get remotefile.txt

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Aug 01, 2005

    As an FTP beginner, I found the information easy to understand and the site well organized. Good site.

  • Anonymous User
    7 years ago
    Jul 20, 2005

    too basic stuff

  • Anonymous User
    7 years ago
    Apr 07, 2005

    nothing great here.

  • Anonymous User
    7 years ago
    Feb 16, 2005

    SUCK STANDARD INFORMATION! USELESS!

  • Anonymous User
    8 years ago
    Dec 03, 2004

    Fairly good site

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.