Documente Academic
Documente Profesional
Documente Cultură
User’s Guide
Software Version 8.0
Ipswitch, Inc.
Ipswitch, Inc. Phone: 781-676-5700
10 Maguire Road Suite 220 Fax: 781-676-5710
Lexington, MA 02421-3127 Web: http://www.ipswitch.com
The information in this document is subject to change without notice and should not be construed as a
commitment by Ipswitch, Inc. While every effort has been made to assure the accuracy of the informa-
tion contained herein, Ipswitch, Inc. assumes no responsibility for errors or omissions.
Ipswitch, Inc. assumes no liability for damages resulting from the use of the information contained in
this document.
The software described in this document is furnished under a license and may be used or copied only in
accordance with the terms of that license.
Copyright © 2003 by Ipswitch, Inc. All rights reserved. WS_FTP, the WS_FTP logos, Ipswitch, and
the Ipswitch logo are trademarks of Ipswitch, Inc. Other products or company names are or may be
trademarks or registered trademarks and are the property of their respective companies.
No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transferred
without the expressed prior written consent of Ipswitch, Inc.
Printing History
May 1996 First Edition
December 1996 Second Edition
July 1997 Third Edition
February 1998 Fourth Edition
October 1998 Fifth Edition
May 2000 Sixth Edition
June 2001 Seventh Edition
March 2002 Eighth Edition
August 2002 Ninth Edition
May 2003 Tenth Edition
Table of Contents
Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Why FTP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
How FTP/SFTP Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
SFTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
New in WS_FTP Version 8.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Installing WS_FTP Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Logging Onto an FTP Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Interfaces for Windows 98, 2000, ME, XP
and NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Classic Interface of WS_FTP Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The Explorer Interface of WS_FTP Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Browser Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Other Ipswitch WS_FTP Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
WS_FTP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
WS_FTP Pro Development Kit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Getting Updates and Giving Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Accessibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 3: Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Using Site Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Connect to Remote Host Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Host Info Dialog of Site Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Organizing Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Automatic Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Connect to Default Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Open with last local and remote folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Alternate Connecting Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Sites Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Recent Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Quick Connect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Address Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Contents iii
WS_FTP Pro
Internet Connection Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Passive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Chapter 8: Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
SSL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
iv Contents
WS_FTP Pro
How to make an SSL connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Client Certificate Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Generating a Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Importing a Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Selecting a Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Trusted Authorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Adding a Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Exporting a Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Removing a Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Non-Trusted Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
How to make an SSH connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
SSL vs. SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Using a NAT Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
To configure SSL through a NAT Firewall: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Contents v
WS_FTP Pro
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Adding a Script to the Scheduler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Updating a Web Site on a Nightly Basis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
vi Contents
WS_FTP Pro
Case Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Examples of Case Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Continue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Jumps and Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Return. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Autodetect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
SSL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
FireScript Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
FireScript reserved words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
FireScript statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
FireScript intrinsic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
FireScript intrinsic variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Contents vii
WS_FTP Pro
viii Contents
WS_FTP Pro
Chapter 1: Introduction
This chapter offers an introduction to WS_FTP Pro, a brief
description of File Transfer Protocols, system requirements, the
installation procedure, information about software updates, and
instructions for giving feedback to Ipswitch, Inc.
Why FTP?
A vast store of software applications, games, images, and other types
Using This Book
of files are available on FTP and SFTP sites all over the world. A site
The WS_FTP User’s Guide
is a resource you should is a computer system (“host”) that uses an Internet protocol called
use to familiarize yourself
with the different features
FTP (File Transfer Protocol) or SFTP (Secure File Transfer Protocol.)
of WS_FTP Version 8.0. FTP and SFTP offers fast and accurate transfers of large files or
collections of files between computers on the Internet.
Many Web sites on the World Wide Web (which is based on another
Internet protocol called HTTP) also provide links to files you can
download -- that is, copy to your PC. Especially for large files,
WS_FTP Pro will speed up the time it takes to copy such files to your
PC. For more information, see “Browser Integration” on page 6.
WS_FTP Pro also allows you to upload files -- that is, copy files from
your PC to other computers. For example, you would upload files if
you need to place your Web pages on a computer system designated
by your ISP (Internet Service Provider), or if you want to store a
picture of something you want to sell through an online auction site.
Introduction 1
WS_FTP Pro
FTP
WS_FTP Pro turns your PC into a client, allowing it to communicate
with virtually all types of FTP sites. When your PC is connected to the
Internet (via a modem or local area network), WS_FTP Pro can
connect to any system that has a valid Internet Address and is running
an FTP server program. Once connected to an FTP site, you can copy
files to and from your local PC or another FTP site.
SFTP
SFTP
You can find more SFTP is a file transfer protocol that runs over a secure SSH (Secure
information about SFTP in
“Chapter 8: Security” on
Shell) client like WS_FTP Pro. It works a lot like FTP, except that all
page 45 communications and transfers between the client and server are done
over a single secure connection.
System Requirements
WS_FTP Pro requires the following system resources:
• An Intel Pentium processor
• Windows 98, 2000, ME, NT or XP
• Internet Explorer 4.02 or newer (does not have to be your default
browser)
2 User’s Guide
WS_FTP Pro
Installing WS_FTP Pro
The installation of WS_FTP Pro is the same for new users, those who
If you are upgrading from a
previous version of are upgrading from a previous version of WS_FTP Pro, and those who
WS_FTP Pro, or replacing are replacing an evaluation version with a purchased version.
an evaluation version, be
sure to install the
purchased version in the
To install WS_FTP Pro from a downloaded file:
same location as your
previous or evaluation 1 Double-click the file you downloaded. (wsftppec.exe)
version.
2 Follow the directions on your screen.
To install WS_FTP Pro from a CD-ROM:
You can install both the 1 If you already have a previous version of WS_FTP Pro on your
Classic and Explorer
interfaces and use them system, make sure you are not running the application (either
interchangeably. Classic or Explorer).
The two interfaces share
the FTP site 2 Insert the WS_FTP Pro CD-ROM into a CD-ROM drive.
configurations you create
in either interface.
3 If the CD-ROM does not automatically display a “Welcome”
screen, click the Start button and select Run.
4 Enter the CD-ROM drive letter followed by autorun. For
example: d:autorun
5 Follow the instructions on your screen.
Please refer to the file named whatsnew.txt or relnotes.txt for
information regarding enhancements or changes that may have been
made to the software since this manual was printed.
Introduction 3
WS_FTP Pro
Most public FTP sites are set up with an “Anonymous” account: when
you connect to one of these FTP sites, you need only identify yourself
as “Anonymous” and use an e–mail address as a password. Normally,
when you log on anonymously, you see a public folder (usually
named something like /pub or /apps) containing the information and
software that can be downloaded to your PC. (Access to other folders
on the site is usually restricted.)
4 User’s Guide
WS_FTP Pro
The Classic Interface of WS_FTP Pro
The Classic interface is a standard Windows application that looks
similar to a two-paned window. When your PC (the “Local System”)
connects to an FTP server (the “Remote System”), the WS_FTP Pro
Classic interface displays a window with your PC’s files and folders
on the left and the FTP site’s files and folders on the right. With the
contents of both systems displayed, you can easily locate files on one
system and transfer them to a specific folder on the other system.
The Classic interface looks similar to this:
The current folder The current folder
on the FTP site is
on your PC is in
shown in this pane.
this pane.
The buttons to the right of each list box provide file and folder
operations for that list box.
The Explorer Interface of WS_FTP Pro
The second interface of WS_FTP Pro is the Explorer interface. The
Explorer interface uses the same software engine as the Classic
interface, but it lets you copy and move files within a system that has
the same look and feel as Windows Explorer.
Introduction 5
WS_FTP Pro
The WS_FTP Pro Explorer interface looks similar to one of the
following:
The appearance of the Explorer
window is determined by your View
menu options.
Explorer interface
Files and
folders in the
current folder
Browser Integration
You can set up WS_FTP Pro so that it automatically handles FTP
Browser Integration is
NOT compatible with URLs when you click them in your browser or in an e-mail message.
Netscape 6. (A URL, Uniform Resource Locator, is an Internet address describing
an Internet resource. For example, the Web URL for the Ipswitch web
site is http://www.ipswitch.com/; the FTP URL for the FTP site of
WS_FTP Pro Patches is ftp://ftp.ipswitch.com.)
WS_FTP Pro handles FTP URLs as follows:
• If the URL is the name of an FTP server, such as
ftp.ipswitch.com, WS_FTP Pro “handles” the URL by starting
the Classic interface of WS_FTP Pro and connecting to the site.
6 User’s Guide
WS_FTP Pro
• If the URL includes the path and name of a file, such as
ftp.ipswitch.com/French/ftp605F.txt, WS_FTP Pro attempts to
download the file to your PC, and prompts you for a location to
save or execute the file.
• If the URL includes the path and name of a folder (and not a file),
such as ftp.ipswitch.com/French, WS_FTP Pro “handles” the
URL by starting the Classic interface, connecting to the site, and
navigating to the folder.
To turn on Browser Integration:
1 Select Browser Integration from the Program Options dialog.
Introduction 7
WS_FTP Pro
WS_FTP Pro Development Kit
You can develop custom applications using the WS_FTP Pro
Development Kit. It lets you create programs to work with WS_FTP
Pro for transferring files to or from FTP sites or between FTP sites.
The Development Kit lets you create an FTP application without
being concerned with the intricacies of network programming.
8 User’s Guide
WS_FTP Pro
We welcome your feedback on WS_FTP Pro. Please e–mail any
comments and suggestions to feedback@ipswitch.com.
Accessibility
WS_FTP Pro is designed for use by all computer users, including
those with certain disabilities that make using a mouse impossible.
Every operation and feature included in WS_FTP Pro has a shortcut
key, or series of keystrokes that allow the user to use their keyboard to
execute the command.
The image below shows the WS_FTP Button bar:
Notice that each of the button labels have a letter that is underlined.
To access the command performed by the button, hold the Alt key on
your keyboard and press the underlined letter on the button you want
to use. For example, Alt + C will disconnect you from the current FTP
site, and Alt +X will close the program.
Introduction 9
WS_FTP Pro
10 User’s Guide
WS_FTP Pro
Chapter 2: Getting Started
This chapter describes how to get started using WS_FTP Pro. The two
main windows of the Classic Interface are described for you, and in
the sidebar are step-by-step instructions on the basic functions of
WS_FTP Pro.
Getting Started 11
WS_FTP Pro
• Hostname/IP Address. Every system (computer) on the Internet
has an official host name or an Internet (IP) address. In order to
connect to an FTP site, you must find out the official name or
address of the site. For example, a system might have a host name
of superserv.ipswitch.com and an IP address of 123.124.125.126.
In WS_FTP Pro, you can use either the host name or the IP
address to specify a particular FTP site.
• User ID. The User ID or user name is given to you by the FTP
site administrator or owner when an account is created. For
information on how to connect without a User ID, see
“Anonymous Connections” on page 15.
• Password. When an account is created, a password is chosen or
issued to you. When used with the User ID, it allows you to
connect to your FTP account.
• Site Options. There are many options you can set in a Site Profile
that controls how WS_FTP Pro makes and maintains connections
to an FTP Site. These options are set through the Site Options
dialog that can be found by selecting a site and clicking the Edit
button on the Connect to Remote Host dialog.
To get started using WS_FTP Pro, you have two choices. You can
either connect to one of the sites we have included in the application,
or you can create you own Site Profile and use that to connect to the
FTP site you identify in the profile.
To connect to a pre-configured site, simply select the site from the
Sites list on the Connect to Remote Host dialog and click the
Connect button.
To configure your own site, click the Create Site button and follow
the directions on the New Site wizard. Once you finish the wizard,
you will be able to select your site and click Connect. From then on,
your site profile will be there for you to use.
Transferring a File
After making your connection, WS_FTP closes the Connection
dialog, leaving the WS_FTP Pro window. The image below shows
how the WS_FTP Pro window looks once you have connected to a
site.
12 User’s Guide
WS_FTP Pro
The following are boxes and window structures that are important in
learning how to make an FTP transfer:
Local System. The left pane shows the directory set as your default
local directory, and all of the files and folders in it. You can change
directories by selecting it from the list, by clicking the Browse (...)
button next to the Local System box, or by typing the folder path in
the box.
Remote System. The right plane displays the default directory for the
FTP site you connect to. You can change directories by selecting it
from the list, by clicking the Browse (...) button next to the Remote
System box, or by typing the folder path in the box.
Address. The Address bar displays the complete path of the FTP Site
you are connected to. If you type this address in manually, the
Address bar will record the last ten sites and folders you have
connected to.
Transfer Arrows. Click these icons to transfer a file:
Upload Arrow
Download Arrow
Getting Started 13
WS_FTP Pro
WS_FTP Pro Toolbar
How to...
Connect. Click this icon to select or configure a site to connect to,
Transfer a file: using the Connection Dialog box.
Once you have connected to a site,
you are ready to transfer a file. Disconnect. Click this icon to disconnect from a site.
Downloading a File
1. Select the directory you want to
download the file to in the
Transfer Manager. Click this icon to display the Transfer Manager.
Local System list.
For more information, see “Chapter 7: WS_FTP Transfer Manager”
2. In the Remote System list, find
the file by clicking on the on page 41.
folder it is stored in (unless the Edit Manager. Click this button to display the Edit Manager for the
file is in the directory you
connected to.) Active Edit function. For more information, see “Active Edit” on
page 34
3. Select the file you want to
download. Batch Mode. Click this icon to place WS_FTP in Batch Mode. In
4. Click the download transfer this mode, selected files will be added to the Transfer Manager to
arrow. It is the one that looks be transferred later.
similar to: <--
5. When the file is downloaded, it Multipart Mode. Click this icon to put WS_FTP in multipart mode.
will appear in the Local This is used to split large files into smaller more manageable
System list. downloads. For more information, see “Multipart Transfers” on
page 29.
Uploading a File
Options. Click this icon to access WS_FTP Program Options.
1. Select the directory you want to
upload the file to in the Remote
System list.
Views. Click this icon to select a view type from the menu. The
2. In the Local System list, select
the file you want to upload. following is a list of these view types.
3. Click the upload transfer arrow.
It is the one that looks similar Large Icons. Click this icon to change the layout of the list pane to
to: --> show file names along with large icons associated with the file
4. When the file is uploaded, it type.
will appear in the Remote
System list. Small Icons. Click this icon to change the layout of the list pane to
show file names along with small icons associated with the file
type.
List. Click this icon to change the layout of the list pane to show an
ordered list of files in a selected directory.
Details. Click this icon to change the layout of the list pane to show
an ordered list of files with the name, size, type, time of last
modification, and attributes listed.
Thumbnails. Changes the layout of the list pane to show
thumbnails of graphic files and icons of others.
14 User’s Guide
WS_FTP Pro
Anonymous Connections
To log on to any FTP site, you must identify yourself with a user ID
and password. For many FTP sites, you can use the word anonymous
as a User ID, and your E-mail address as your password; this is known
as an "anonymous login." (All of the Ipswitch preconfigured FTP sites
are set up as anonymous logins.)
FTP sites that allow anonymous logins usually exist to provide files
that can be downloaded by the general public; anyone on the Internet
can log onto the site anonymously and copy files to their PC. This is
similar to logging on to a file server as a "guest."
Anonymous logins have access to a vast store of software, games,
music, and numerous other resources. However, if you log in
anonymously, you usually are not allowed to do more than view
public folders and download files. (You are usually unable to view
private folders or to upload files.)
Assistance Center
The WS_FTP Pro Assistance Center has been created to help new
users get up and running with WS_FTP Pro as quickly as possible,
and to give more experienced users quick access to our online support.
The Assistance Center includes:
• Tutorials. Our interactive tutorials are available to anyone
with a connection to the internet. The two lessons walk users
through how to get connected to an FTP site and how to
successfully transfer files.
• Getting Started Guide. This guide offers information on
how to get started using WS_FTP Pro, and a tour of the
product that points out various functions.
• Common Terms and Definitions. Look here for a list of
common terms and phrases used in our documentation.
• Link to our Knowledge Base. You can also directly access
the Knowledge Base articles through this link.
Getting Started 15
WS_FTP Pro
Using the Help System
Our Online Help system contains detailed descriptions and directions
on how to use each and every function available in WS_FTP Pro. It
should be the first place you look if you have any question using the
product.
16 User’s Guide
WS_FTP Pro
Chapter 3: Connections
This chapter details the different ways users can make FTP
connections using WS_FTP Pro.
Connections 17
WS_FTP Pro
• Create Site. Click this button to access the Site Profile wizard.
Use this wizard to create a new site profile.
• Create Folder. Click this button to access the New Folder
wizard.
• Edit. Click this button to edit the selected site profile.
• Delete. This button deletes a selected site or folder.
• Close. Click this button to close the Connect to Remote Host
dialog box.
• Help. Click this button to access the WS_FTP Pro Online Help
system.
• Configured Sites. This box lists all of your configured sites.
18 User’s Guide
WS_FTP Pro
• Password. Enter your password for the site you are connecting
to.
• Account. Some FTP sites, notably VM/CMS hosts, require an
account in order to authenticate the client and provide access to a
default directory for the user. For most sites, however, no account
is required.
• Anonymous. Select this option if you are making an anonymous
connection to the selected site. For information on anonymous
connections, see “Anonymous Connections” on page 15.
• Save Password. When you select this option, the password will
be saved with the site information. It is recommended that you do
not select this option if other people have access to your
computer.
• Save Account. Select this option to save the account information
entered in the Account box with the site information.
• Comment. Enter any comment you would like to make about the
site.
Organizing Sites
With the Organize Sites dialog, you can create, organize, and modify
site profiles while connected to an FTP site (you have to disconnect
before you can access the Connect to Remote Host dialog).
To access this dialog, select Organize Sites from the Sites menu.
Notice that the buttons here also appear on the Connect to Remote
Host dialog.
Connections 19
WS_FTP Pro
Automatic Connections
If you have a single site that you connect to over and over again, you
can have WS_FTP Pro attempt to make a connection as soon as you
Setting a default site start the application. This can be done in one of two ways, using the
To set a default site, right- Auto reconnect option on the General dialog of Program Options.
click on the site profile and
select Default Site from Connect to Default Site
the menu.
By setting this option, and choosing a default site profile on the
Connect to Remote Host or Organize Sites dialog, you can have
WS_FTP Pro connect to that site as soon as you open the application.
Open with last local and remote folders
If you do not want to set up a default site to use every time you open
the application, you can select this option to have WS_FTP Pro open
the last remote connection to the last remote folder you were in when
you exit the application. It will also display the last local folder you
were in as well.
If you do not have a remote connection when you close the
application, it will not auto reconnect to any site.
20 User’s Guide
WS_FTP Pro
To change the folders or layout of this list, select Organize Sites and
use the Organize Sites dialog.
Recent Sites
On the File menu, you will find the Recent sites submenu. This menu
shows the last ten FTP sites you successfully connected to. You can
establish a connection by selecting one of the sites from the menu.
Quick Connect
Quick Connect provides a means for you to connect to an FTP site
with minimal effort and time; for example, you might use Quick
Connect to connect to a site that you want to visit just once.
To use this feature, select Quick Connect from the File menu.
Note
Quick Connect does not work for SSL or SSH connections.
Connections 21
WS_FTP Pro
Address Bar
The Address bar of the WS_FTP Pro Classic interface can be used in
three ways to connect to an FTP server:
Type the address directly into the Address bar
If you type the address alone, WS_FTP Pro will prompt for a
username and password. You can also type the username and
password in front of the site address in this format:
username:password@ftp.ipswitch.com:port/path. Example:
robert:armstrong@ftp.ipswitch.com:21/pub/
You can also enter the username and password in the boxes below the
address bar, after entering the ftp address in the address box.
Note
You can make an SSL or SSH connection by selecting the type of
secure connection from the lock icon next to the address box on the
address bar. For more information, see “Chapter 8: Security” on
page 45
22 User’s Guide
WS_FTP Pro
• Connect using a dial-up connection. Select this option to have
WS_FTP Pro connect to the internet using a dial-up connection.
This is a connection made by your computer using a modem and
your telephone lines.
• Select a dial-up connection. If you have multiple dial-up
connections configured in your Windows Dial-Up Networking,
select the configuration you want WS_FTP Pro to use here.
• Disconnect when application exits. Select this option to have
WS_FTP Pro end your connection to the internet when the
application is closed. This will end any connection you have
made through any means.
• Disconnect only when application establishes connection.
Select this option to have WS_FTP Pro end your connection to
the internet when the application is closed, only when WS_FTP
Pro made the internet connection in the first place.
Passive Mode
Normally, when you connect to an FTP site, the site establishes the
data connection to your PC. However, some FTP sites allow passive
transfers. This means that your PC establishes the data connection.
By default, passive mode is turned on in WS_FTP Pro; we
recommend that you use it for transfers to and from FTP sites that
support it. Note that passive mode may be required in the following
instances:
• For users on networks behind some types of router-based
firewalls
• Users on networks behind a gateway requiring passive
transfers
• If transfers are erratic
• If you keep getting failed data channel or blocking call
cancelled errors.
Connections 23
WS_FTP Pro
24 User’s Guide
WS_FTP Pro
Chapter 4: Transferring Files
Transferring means moving or copying files or folders between
computers. If you transfer a file from your computer (local system) to
an FTP Site (remote system) it is called an upload. If you transfer a
file from a remote system to your local system, it is called a
download. If you transfer between two remote sites, it is called a site
to site transfer.
Upload Arrow
When your cursor looks like this, When your cursor looks like this,
you are at a place where you you cannot drop a dragged file
can transfer a file. there.
When you release the mouse button, WS_FTP Pro attempts to transfer
the file to that location.
Transferring Files 25
WS_FTP Pro
Copy and Paste
Right-mouse click a file, then select Copy from the pop-up menu.
Confirming Overwrites
Right-click where you want to transfer the file to, and from the right-
Most sites allow you to
overwrite or replace a file mouse menu select Paste. WS_FTP Pro then attempts to make the
without giving you any
kind of visual warning. transfer.
Through WS_FTP Pro, you
can set it up so that a dialog Batch Mode
box is displayed to warn
you that you are about to If you want to transfer multiple files from different sites, you can put
overwrite a file.
For specific directions on
WS_FTP Pro in Batch Mode.
this feature, see the
Transferring Files section While in batch mode, WS_FTP Pro will add a request to the Transfer
of the Online help.
Manager, to be performed when you choose. If you want to make an
immediate transfer while in Batch Mode, without having it go through
the queue, select the file and drag it to the destination folder.
Using the Transfer Manager
The WS_FTP Pro Transfer Manager is used to view the progress of
transfers, to schedule the transfer of multiple files, and to view logs
for individual transfers. For more information, see “Chapter 7:
WS_FTP Transfer Manager” on page 41.
Upload Wizard
The Upload Wizard is a utility that allows you to transfer files from
your local system to a remote FTP site without using the WS_FTP Pro
interface. There are two ways to access the Upload Wizard:
• In Windows Explorer, select the files or folders you want to
upload, then right-mouse click on the list. In that list you will see
'Upload using WS_FTP Upload Wizard.' After selecting that
option, the Upload Wizard appears with the files already added to
the upload list.
26 User’s Guide
WS_FTP Pro
• Select WS_FTP Upload Wizard from your Windows Start menu.
This will open the Wizard ready for you to add the files you want
to upload.
After the files are added to the Upload wizard, you will be asked to
select a remote folder or enter a remote URL. This is where the files
are uploaded to.
Hotdrop Folder
Hotdrops are shortcuts to remote directories that you can create
anywhere on your local system. They appear as files with the
Using Hotdrops extension .fhf.
Hotdrops are excellent
ways for you to quickly If you click on the file, WS_FTP Pro launches and automatically
upload files without having connects to the site and navigates to the local and remote folders that
to launch WS_FTP Pro. If
you are updating a web you identify when you set up the hotdrop.
site, think about placing a
Hotdrop in your production You can also drag files and folders to the icon and drop them. The
folder. When you update a
file, just drag it on the files and folders will then be automatically uploaded to that site. The
Hotdrop icon and it will be
transferred to your site.
Transfer Manager appears to show the progress of the transfers.
Transferring Files 27
WS_FTP Pro
Transfer Modes
There are three modes that WS_FTP Pro uses to transfer a file.
Depending on the type of file, you may have to select this mode
before you attempt to transfer a file.
Transfer Mode
These modes are called ASCII, Binary, or Auto. The following chart
shows the icon that should be chosen for the described type of file.
28 User’s Guide
WS_FTP Pro
Automatic Retry
If the initial attempt to transfer a file fails, WS_FTP Pro can
automatically retry the attempt a set number of times.
To set the Automatic retry:
1 From WS_FTP Pro, click the Options button.
2 Select the Transfers dialog.
3 In the Number of retries for failed transfers box, enter the
number of times you want WS_FTP Pro to retry the transfer (0-
99.)
Multipart Transfers
When in Multipart mode, WS_FTP Pro will split large files into
smaller and download all sections with different, yet concurrent,
connections. This will decrease the amount of time it takes to
download large individual files.
Transferring Files 29
WS_FTP Pro
The number of connections made is determined by the number of
additional connections specified in the Site Profile, as well as the
number of connections allowed by the server and the Number of
parts used on multi-part transfers option on the Transfers dialog
of Program Options.
The Transfer Manager will display the file, the number of segments
that the file has been divided into, and the status of the transfer of each
of the segments. When each of the segments are complete, the
Transfer Manager will show the status of the re-combining of the
files, if that process takes longer than 2 seconds.
If there are no segments listed under the file being transferred, than
the file is not large enough to be divided.
Note: Multipart does not work with SSH connections or with uploads.
To use Multipart mode, click the Multipart mode button on the
WS_FTP Pro toolbar.
30 User’s Guide
WS_FTP Pro
Chapter 5: Managing Files and Folders
This chapter deals with using WS_FTP Pro to manage files and
folders on both local and remote systems. Managing files and folders
includes:
• Viewing and navigating
• Working with files and folders
Up one Level
The Address bar displays the complete path to the FTP site directory
you are currently connected to.
The left side of the WS_FTP Pro window shows your local system,
and where on that system you are. The Local Directory listing
displays everything that is visible in the folder identified in the Local
System box.
32 User’s Guide
WS_FTP Pro
The graphic below points out key features used during these tasks.
Command
buttons (Command
Bars)
Files
Active Edit
The active edit feature allows you to edit remote files quickly and
without having to actively transfer them first. When you select a file
and click Edit, the file will be opened in the application that it is
associated with. If you want the file to be associated with an
application other than the default application, you have to configure it
on the Active Edit dialog.
34 User’s Guide
WS_FTP Pro
To configure an extension for active edit:
1 From the Program Options, select the Active Edit dialog.
2 Click Add to add a new entry, or select one from the list and click
Edit. The Active Edit Properties dialog appears.
In the directory list, the first position indicates whether the item is a
file (-, s, S, or t) or directory (d), while positions two through ten show
the permissions for Owner, Group, and Other.
36 User’s Guide
WS_FTP Pro
For example, find drwxr-x--x in the directory list. This expression
is comprised of four parts:
d rwx r-x --x
First position Positions 2-4 Positions 5-7 Positions 8-10
indicates indicate indicate Group indicate Other
whether item Owner permissions: permissions:
is a file (-,s,S, permissions: read and execute only.
or t) or read, write, execute.
directory (d) execute.
Overview
The following graphic points out key features in the Explorer
Look for more detailed
information in the Online Interface that make it different from the Classic Interface. The graphic
Help. Most sections are
applicable to the Explorer
represents the appearance of the interface after you make a successful
Interface. connection to an FTP server.
My Computer. Select Display button changes the way the files are displayed.
this item to view your
local system and
mapped drives.
Site Icon
Explorer Interface 39
WS_FTP Pro
1 Select the folder you want the site configured in.
2 Click the New Site icon on the toolbar.
3 Follow the directions on the dialog to create a new site.
4 Click Finish once you have gone through the process.
Once you click Finish, the site will be added to the folder.
Making a Connection
Once you have a site configured, you can connect to the site. To do
this, all you have to do is click on the site name in the left-pane. If the
settings are correct, and the FTP site is accepting connections, the
right-pane will display the remote directory once connected.
Note
The Explorer interface allows multiple connections to remote servers
at the same time.
Transferring Files
Transferring files in the Explorer Interface is very much like the drag-
and-drop feature of the Classic interface. To transfer a file:
1 Connect to a site.
2 Move to the directory that holds the file you want to upload, or to
the directory in which you want to place a downloaded file.
3 Select the file or folder you want to transfer (You can select
multiple files by holding down the Ctrl key while you click on a
file.) Files to be uploaded can be selected from the desktop or
from the mapped drives in the Explorer Interface (above the sites
list).
4 With the file(s) selected, drag them to where you want them
transferred to. If you are uploading them, drag them to your
remote directory on the FTP site. If you are downloading the
files, drag them to your desktop or to the directory you want them
in.
40 User’s Guide
WS_FTP Pro
Chapter 7: WS_FTP Transfer Manager
This chapter includes the following topics:
• What is the Transfer Manager?
• Transfer Manager Dialogs.
Pause a transfer The History tab of the Transfer Manager displays a list of successful
To pause an active transfer from the transfers. This list can be sorted by clicking on the column headers.
Transfer Manager:
1 Select the entry.
2 From the Transfers menu, select
Pause.
You can also click the Pause button
next to the status column.
• Transfer Arrow. The arrow on the far left side of the item
identifies what type of transfer was performed. An up arrow
How to...
means upload, a down for download, and a left-right arrow is for
Remove an item site to site transfers.
To remove an item from the Transfer
Manager: • Date. This is the date and time the transfer was completed.
1 Select the file you want removed.
• Source. This is the site profile that was used to connect to the
2 From the Transfers menu, select
Delete.
source.
• Source Path. The path on the source directory from the root to
the transferred item.
• Source File Name. The name of the source file that was
transferred.
• Destination. The site profile and folder that was used to connect
to the destination.
• Destination Path. The path on the destination directory from the
root to where the transferred item was placed.
• Destination File Name. The name of the file after it has been
transferred.
• Size. The number of bytes transferred.
Executing a file
Once a file is successfully transferred, you can select it and choose
Execute from the History menu. If it is a download, the destination
file will be opened in its associated application. If it is an upload, the
source file will be opened.
42 User’s Guide
WS_FTP Pro
Clearing the History
You can remove items from the history list by selecting them and
choosing Delete from the History menu.
You can remove all items by selecting Clear All from the History
menu.
Request Properties
You can double click any item on the Transfer Manager dialog to
view the Request Properties dialog for that item.
How to... The following information appears on the File Properties dialog.
Schedule a transfer • Elapsed Time. The amount of time that has passed since the
To schedule a transfer from the transfer began.
Transfer Manager:
1 Select a request, file, or folder. • Contains. Number of files and folders contained in the request.
2 From the Transfers menu, select (Only displayed when a folder is selected)
Schedule.
• Transferred Bytes. The number of bytes transferred.
3 In the Schedule Item Properties
dialog, the date, time, and • Transfer Rate. The number of Kilobytes being transferred per
frequency of the transfer.
second.
4 Click OK to add the item to
Scheduler. • Transfer Mode. The mode the file was transferred in.
• Attempts. Number of times the application tried to make the
transfer.
• Operation. The type of transfer being performed. Either Upload
or Download.
• Status. The current status code of the listed item.
• Source. The path name of the source of the transfer.
• Destination. The path name of the destination of the transfer.
44 User’s Guide
WS_FTP Pro
Chapter 8: Security
This chapter describes the two security protocols found in WS_FTP
Pro: SSL and SSH. It also explains how to configure WS_FTP Pro to
use these protocols to make secure connections.
SSL
SSL (Secure Socket Layer) is a protocol for encrypting and decrypting
data sent across direct internet connections. When a client makes an
SSL connection with a server, all data sent to and from that server is
encoded with a complex mathematical algorithm that makes it
extremely difficult to decode anything that is intercepted.
The following is a step by step illustration of how SSL works.
Step 1. The client makes the initial connection with the server and
requests that an SSL connection be made. If Implicit SSL is
used, the initial connection will be encrypted. If Explicit is
used, the initial contact will be ‘in the clear.’
Step 2. If the server is properly configured, the server will send to the
client its certificate and public key.
Step 3. The client compares the certificate from the server to a trusted
authorities database. If the certificate is listed there, it means
the client trusts the server and will move to step 4. If the
certificate is not listed there, the user must add the certificate
to the trusted authorities database before going to step 4.
SSL Utility 45
WS_FTP Pro
Step 4. The client uses that public key to encrypt a session key and
sends the session key to the server. If the server asks for the
client’s certificate in Step 2, the client must send it at this
point.
Step 5. If the server is set up to receive certificates, it compares the
certificate it received with those listed in its trusted authorities
database and either accepts or rejects the connection.
If the connection is rejected, a fail message is sent to the cli-
ent. If the connection is accepted, or if the server is not set up
to receive certificates, it decodes the session key from the cli-
ent with its own private key and sends a success message back
to the client, thereby opening a secure data channel.
The key to understanding how SSL works is in understanding the
parts that make SSL itself work. The following is a list of these parts
and the role each plays.
Client. In this case, the client is WS_FTP Pro.
Certificate. The Certificate file holds the identification information of
the client or server. This file is used during connection negotiations to
identify the parties involved. In some cases, the client’s certificate
must be signed by the server’s certificate in order to open an SSL
connection. Certificate files have the .crt ending.
Session Key. The session key is what both the client and the server
use to encrypt data. It is created by the client.
Public Key. The public key is the device with which the client
encrypts a session key. It does not exist as a file, but is a by-product of
the creation of a certificate and private key. Data encrypted with a
public key can only be decrypted by the private key that made it.
Private Key. The private key decrypts the client’s session key that is
encrypted by a public key. The private key file has the .key ending.
Private keys should NEVER be distributed to anyone.
Certificate Signing Request. A certificate signing request is
generated each time a certificate is created. This file is used when you
need to have your certificate signed. Once the Certificate Signing
Request file is signed, a new certificate is made and can be used to
replace the unsigned certificate.
46 User’s Guide
WS_FTP Pro
How to make an SSL connection
To make an SSL connection with a server configured for SSL.
1 Create a site profile and select either FTP/Implicit SSL or FTP/
SSL (AUTH SSL) when asked for the server type.
2 After you click Connect, WS_FTP Pro tells the server that you
want to make an SSL connection. The server then transmits to
you an identifying certificate, letting the client know who the
server is. If that certificate is already listed in your Trusted
Authority database, the connection is made.
3 If that certificate is not listed as a trusted authority, the Non-
Trusted Authority dialog box appears.
4 Select the option you need and click OK. If the server does not
require a certificate to be returned, the secure connection will be
established. All data transmitted between you and the server will
be encrypted.
If the server you are attempting to make a connection to asks
WS_FTP Pro to send back a certificate, follow the direction for Client
Certificate Verification.
Client Certificate Verification
If the server you are attempting to make a connection to requires your
client to send an identifying certificate back to the server, you must:
1 Configure the site and select either FTP/Implicit SSL or FTP/
SSL (AUTH SSL) when asked for the server type.
2 Create a certificate. Refer to the section “Generating a
Certificate” on page 48 for more information.
3 Send the Certificate Signing Request file to your server
administrator.
4 Once the server administrator signs the Certificate Signing
Request, it will be sent back to you.
5 When you receive the file, follow the directions for “Selecting a
Certificate” on page 50, selecting the new certificate to go in the
Certificate box.
6 Connect to the server.
SSL Utility 47
WS_FTP Pro
Generating a Certificate
To create an SSL certificate:
1 From the Program Options, select Client Certificates.
Note
It is important to remember this pass phrase. The pass phrase can
be any combination of words, symbols, spaces, or numbers.
48 User’s Guide
WS_FTP Pro
Common Name. This can be either the name of the person
creating the certificate or the fully qualified domain name of the
server associated with the host.
E-mail. E-mail address of the person the certificate belongs to.
Unit. Name of organizational unit. (Ex. Research and
Development)
Country. The country you are in. This must be a valid two letter
country code. (Ex. US)
8 After all of the boxes are filled in correctly, click Next to
continue. If all of the boxes are not filled in, you cannot continue.
9 Review the information on the last dialog and click Finish to
create the certificate.
If you are creating a certificate to be used by WS_FTP Pro, you
should send the certificate signing request (by E-mail) to your server
administrator. If they require it, they will sign the certificate and
return it to you. Once you receive the certificate, you must import it
into your certificate database.
Importing a Certificate
To use a certificate sent to you, or one you have generated by
WS_FTP Server, you must import the certificate into your certificate
database.
To import a certificate
1 On the Program Options: Client Certificates dialog, click the
Import button. The Import Certificate wizard appears.
2 Click the Browse (...) button to select the certificate file.
3 Click Next.
4 Click the Browse (...) button to select the private key file for that
certificate.
5 Click Next.
6 Enter the pass phrase that was used to create that certificate.
7 Click Next.
SSL Utility 49
WS_FTP Pro
8 Enter the name that you want to use to identify the certificate on
your certificate list.
9 Click Next.
10 Review the information on the final dialog and click Finish to
add the certificate to the list.
Selecting a Certificate
Certificates are used on the site level, meaning that you must select a
certificate for each site profile that you create (you can use the same
certificate for all of your sites if you wish.)
Certificates are selected on the Site Options: SSL dialog by choosing
the certificate name from the Client certificate pull-down list. The
pull-down list displays all certificates in the Program Options:
Client Certificate dialog.
Trusted Authorities
The Trusted Authorities dialog stores a list of certificate names that
are trusted by the user.
50 User’s Guide
WS_FTP Pro
Certificate Display:
Issued To. Who the certificate was issued to.
Issued By. Who the certificate was signed by.
Expires. Date on which the certificate expires.
Adding a Certificate
To add a certificate to the database:
1 Click the Import button and select the path and file name for the
certificate. The Add Certificate? dialog box appears.
2 Review the information on that dialog box and click Yes to add
the certificate to the database.
Exporting a Certificate
To export a certificate from the Trusted Authorities database:
1 Select the certificate you want to copy out of your database.
SSL Utility 51
WS_FTP Pro
2 Click the Export button.
Select the folder you want to copy the certificate to and enter the
name you want to save the certificate file as.
3 Click OK.
Removing a Certificate
To remove a certificate:
1 Select the certificate to be removed.
2 Click Remove.
3 A warning appears advising you to export the certificate before
you remove it. Removing the certificate deletes the certificate
file.
4 Click OK to remove the certificate.
Non-Trusted Certificate
When you connect to a server using the SSL connection option, that
server sends you a certificate. If that certificate is not listed on the
Trusted Authority tab, or if it was not signed by a certificate on this
list, this dialog box appears.
Certificate Information:
Issued To. Name of the person or company who the certificate
belongs to.
Issued By. Name of the person or company who signed the
certificate.
52 User’s Guide
WS_FTP Pro
Active From. The date on which this certificate was activated.
Expires On. The date the displayed certificate will no longer be a
valid certificate.
Options
Allow this connection only. If this option is selected, the connection
will be made, but WS_FTP Pro will still not recognize the certificate
as a trusted authority. The next time you attempt to connect to this
server, this dialog box appears once again.
Trust this certificate. If this option is selected, the connection will be
made and the certificate will be added to the trusted authority database
in the Trusted Authority tab, so future connections can be made
without you being prompted.
Do not allow this connection. If this option is selected, the
connection will be terminated.
SSH
SSH (Secure Shell) is a security protocol that allows you to make a
secure connection to a server that has the SSH and SFTP (Secure File
Transfer Protocol) protocols installed. Where FTP servers usually
‘listen’ on port 21 for connection, SSH servers use port 22.
Where explicit SSL attempts to make a connection with unencrypted
channels, SSH encrypts all communications to and from the client and
server. When an SSH connection is made, SFTP is the protocol that is
used to perform all tasks on that single secure connection.
SSL Utility 53
WS_FTP Pro
3 Click the Advanced tab.
4 In the Server type pull-down, select SFTP/SSH.
5 Click OK.
When you use that profile to make a connection, the client will
automatically attempt to make an SSH connection on port 22 of that
server.
54 User’s Guide
WS_FTP Pro
Chapter 9: Synchronizing Files and Folders
The WS_FTP Synchronize Utility lets you synchronize (or “mirror”)
directory structures between your system and a remote FTP server
with minimal intervention.
It lets you keep remote sites up-to-date by automatically uploading
files which have changed while deleting files that have been removed
from the master directory. This is especially useful for quickly and
efficiently updating Web sites.
This chapter gives an overview of the Synchronize Utility and some
examples of how you might use it. For detailed instructions on using
the Synchronize Utility, start the Synchronize Utility and use its
online Help.
Synchronize Dialog
This is the main dialog of the WS_FTP Pro Synchronize utility. When
using this dialog, you are creating a control file that will be used to
perform the synchronization of the locations that you identify.
The following are the features found on this dialog:
• Locations. The locations section is where you identify the
directories that you want to synchronize. Click the Browse (...)
button to choose the directory for Location 1 and Location 2.
Location 1 can be local or remote. Location 2 must be a remote
directory.
• Top level only. Select this option to have the locations
synchronized on the top level only. All subdirectories will be
ignored.
56 User’s Guide
WS_FTP Pro
• Exclusions. See “Exclusion Examples” on page 60 for more
information.
• Buttons. The buttons control the various functions of the utility.
• Open. Click this button to open a control file.
• Save. Click this button to save your current settings as a
control file.
• Schedule. Click this button to schedule the sync job through
WS_FTP Scheduler.
• Execute. Click this button to execute the sync job. If the
Visual compare only (no transfer) option is selected, the
Compare dialog will show what is going to happen, but no
transfers will be made.
• Exit. Click this button to close the application.
Example
The following is an example of how you might use the WS_FTP
Synchronize Utility.
When you click the Execute button, the control file named
ipswitch.ctl (the name is displayed in the title bar for the dialogue) is
executed according to the parameters set on the WS_FTP Synchronize
Utility screen:
• Synchronize makes a connection with the FTP site defined
in the Location 2 box and logs on with the information stored on
the site profile.
58 User’s Guide
WS_FTP Pro
To create a control file:
1 Choose a directory for both Location 1 and Location 2. You can
type in a local directory in either box, or click the Browse (...)
button to choose a remote site from a site profile, or a local folder.
Click the Local tab on the Folder Selection dialog to choose a
local folder.
2 Select the options you want to use.
3 Select the mode you want to execute.
4 Review the Status and Actions that will perform and make any
adjustments you need to make. If you make an adjustment, your
status will be changed to Customized.
5 Identify any Exclusions you may have.
6 Click Save to save the control file.
You will now be able to use that control file anytime you use Sync.
Exclusions
With the Exclusion system, you can enter a file name, file extension,
or search string to have WS_FTP Synchronize ignore any files that
match the string. Wildcards (* and ?) can be used for unknown file
names or several files of a similar name or type.
To add an exclusion
1 Click the Add button in the Exclusions section of the dialog. The
Exclusion dialog appears.
2 In the Exclusion dialog, enter what you want to exclude in the
Rules box. If you are using the Absolute location type, you can
click the Browse (...) button to select the file or folder.
3 In the Type box, select what type of item you want to apply the
exclusion to:
• Apply to files. If you want to apply the exclusion to files
only.
• Apply to folders. If you want to apply the exclusion to
folders only.
• Apply to both. If you want to apply the exclusion to both
files and folders.
60 User’s Guide
WS_FTP Pro
Relative directory exclusions
Exclusion rule: mydir
Type: Apply to folders
This will exclude any directory named mydir anywhere in the file
system.
Exclusion rule: m*ir
Type: Apply to folders
This will exclude any directory that matches the mask m*ir from
anywhere in the file system. The * means that the name can have any
number and value of character in between the "m" and the "ir."
62 User’s Guide
WS_FTP Pro
Chapter 10: The Find Utility
The WS_FTP Find Utility lets you search an FTP site for files that
match your criteria, and then transfer the found files to your PC.
This is especially useful for anyone who is looking for one particular
file on a large, complex FTP site.
This chapter gives an overview of the Find Utility and some examples
of how you might use it. For detailed instructions on using the Find
Utility, start the Find Utility and use its online Help.
The search
found this
file.
64 User’s Guide
WS_FTP Pro
Examples
The following are examples of different types of searches.
Finding a File When You Are Not Sure of Its Name
The graphic below shows how to search for a file when you are not
sure of the correct full name. In this case, the name begins with ws_f,
but the rest of the name is unknown. The * at the end is a “wildcard”
that takes the place of the missing characters. When this search is run,
the Find Utility locates every file on the site that begins with ws_f.
Search text
66 User’s Guide
WS_FTP Pro
To locate a particular folder:
1 Click the Browse button next to the Look In field to connect to
the selected site and display a list of the available folders.
In the Size is box, you can select At least or At Most then enter the
file size in kilobytes in the KB box.
Executing Scripts
You can execute scripts from either the Command Prompt or
from the Scripting Utility itself.
Executing a Script from the Command Prompt
Go to the Command Prompt and type ftpscrpt followed by the
appropriate command line parameters. For example:
ftpscrpt -f script1.scp
There are other parameters you can use with the ftpscrpt command.
For detailed information, go to the Scripting Utility online Help and
see “Executing Scripts.”
To be able to run a script from any location on your hard disk, we
recommend that you place the Scripting Utility folder in the Path
statement in your Autoexec.bat file – if you are running Windows 98,
Windows ME, and Windows XP. If you’re using Windows NT or
Windows 2000, add the WS_FTP Pro folder to the path variable in the
System Environment.
70 User’s Guide
WS_FTP Pro
Running a Script from the Scripting Utility
To run a script from the Scripting Utility, start the utility, open
the script, and click Go.
Example
In the following example, the script:
1 Turns on the Trace command to send detailed information to
the transfertrace.txt file.
2 Creates a log called transferlog.txt in the C:\ directory.
3 Logs onto the server with the user name sdavis.
4 Logs onto the server with the password fourthandgoal.
5 Connects to the FTP server ftp.mywebprovider.com.
6 Changes the remote directory to /user/sdavis/images.
7 Changes the local directory to C:\My Documents\My Pictures
8 If the MGET is successful, the script executes the FILEDELETE
label.
9 If the MGET fails, the script executes the DISCONNECT label.
10 All files ending in .jpg are copied from the remote directory to the
local directory.
11 This line identifies the FILEDELETE label.
12 All files ending in .jpg are deleted from the /user/sdavis/images
remote folder.
13 This line identifies the DISCONNECT label.
14 Disconnects from the FTP server.
Once you are in the Scheduler window, you are ready to set up a file
transfer task. You can:
• Add a pre-existing script to run at a particular time. (For more
information on creating scripts, see “Chapter 11: Scripting”
on page 69.)
• Drag and drop a file from the WS_FTP Pro Classic or
Explorer Interface to the Scheduler window to create an
upload task.
• Create a new transfer/custom task.
• Modify or delete tasks.
The WS_FTP Pro Scheduler will run the task at the time you schedule
it to run, or you can make the task run on demand by using the Run
Now option.
Scheduler 73
WS_FTP Pro
Examples
The following are examples of how you might use the WS_FTP
Scheduler.
Adding a Script to the Scheduler
To add a script to the scheduler:
1 From the File menu, select New > Custom.
A Schedule Item Properties dialog appears.
2 In the Start Date and End Date boxes, set the dates for when
you want this recurring task to begin and when you want it to end.
3 In the Start Time box, enter the time of day you want the task to
be run.
4 In the Executable box, enter the full path to the ftpscript.exe
application.
5 In the Command box, enter -f followed by the full path to the
script you want WS_FTP Scheduler to run. If the path contains
spaces, put quotation marks around the path.
6 If you are on an NT or Windows 2000 or XP workstation, you
must enter your NT/2000 user login and password in the boxes
provided.
Note
If you are on a domain, include the domain name in the User Login
box. Example: IPSWITCH_D\userid
74 User’s Guide
WS_FTP Pro
7 Select the frequency of the recurring transfer in the Schedule
Frequency area.
8 Click OK to add this task to the scheduler.
Updating a Web Site on a Nightly Basis
If you have a Web site you would like to update every night, without
having to manually upload all of the files you have recently changed,
you can set up a scheduled task to have it run as frequently as you like.
Scheduling items:
1 Select the files in WS_FTP Pro and select Send to Scheduler
from the right-mouse menu.
You can select multiple files or folders by holding the Ctrl key
and clicking the name.
The Schedule Item Properties dialog appears.
2 In the Start Date and End Date boxes, set the dates for when
you want this recurring task to begin and when you want it to end.
3 In the Start Time box, enter the time of day you want the task to
be run.
4 The Executable, Command, and Task Name boxes are filled in
for you. (Note that in the Command box, there is a .tmp file
identified. This file tells the application which files to download
and where to transfer them to and from.)
5 If you are on an NT, Windows 2000 or XP workstation, you must
enter your NT, 2000, XP user login and password in the boxes
provided.
6 Select the frequency of the recurring transfer in the Schedule
Frequency area.
7 Click OK to add this task to the scheduler.
Scheduler 75
WS_FTP Pro
76 User’s Guide
WS_FTP Pro
Chapter 13: Using Firewalls
Some organizations separate their local networks from the rest of the
Internet by installing a firewall or “gateway.” A firewall is a system or
software which is configured to prevent particular types of access or
information from entering the network. Most firewalls block the flow
into the local area network, but allow individuals to access most
resources outside of the network.
WS_FTP Pro lets you enter information about a particular firewall
into a firewall configuration, which you can then use when connecting
to a particular FTP site from behind that firewall. You can configure
the firewall once, and then assign that firewall configuration to those
sites that require it.
With the FireScript editor, you can edit firewall scripts to work the
way you want them to work. For more information, see “Appendix A:
FireScript Editor” on page 89.
Multiple Firewalls
There are several reasons you might want to create more than one
firewall configuration. If you use a laptop computer in different
locations that have different firewalls, you will want to set up a
firewall configuration for each location, so you can switch to the
appropriate firewall configuration when you are in each location.
Another reason you might want to set up multiple firewall
configurations is that your network could have more than one router
configured as a firewall. In this case, you would assign a different
firewall configuration to an FTP site depending on which part of the
network you are working from.
Furthermore, you might have a number of trusted sites (for example,
FTP sites owned by your company) for which you would use a
different firewall (or no firewall).
Using Firewalls 77
WS_FTP Pro
Firewall Types
The following table lists all conventional firewall types and the
information about each that you will need to procure and enter
into WS_FTP Pro.
Configuring a Firewall
To enter firewall information, you will need to get data about your
For some router-based
firewalls, you will want to firewall from your network administrator. For more information, see
use passive mode, in which Firewall Types above.
the data connections are
established by the FTP
client (WS_FTP Pro) rather To configure a firewall:
than by the FTP site.
1 Click the Options button.
2 Select the Firewall dialog.
3 Click the New button.
4 Follow the directions on the New Firewall wizard.
5 When you click Finish, the firewall will be added to the
Configured Firewalls list.
78 User’s Guide
WS_FTP Pro
You can now assign the firewall configuration to the site, as
described in Using a Configured Firewall below.
Using Firewalls 79
WS_FTP Pro
80 User’s Guide
WS_FTP Pro
Chapter 14: Using the Command Line
You can use the command line from the MS-DOS prompt to run the
WS_FTP Pro Classic interface.
When you use the command line, you are actually running a subset of the
functionality of the Classic interface. Using the command line, you can:
• Upload and download files
• Specify ASCII or binary transfer mode
• Convert file names to lowercase when uploading
• Set up pre-scheduled transfers
• Create batch files that will handle multiple commands
So you can use the The following illustrates the correct command line syntax, broken down
command line from any by argument type.
location on your hard disk,
we recommend that you (command name: wsftppro) (source) (destination)
place the WS_FTP Pro
folder in the Path statement
in your Autoexec.bat file, if Written out, a command using this format would look like this:
you are running Windows
98, 2000, ME, or XP. If wsftppro -s local:c:\tartan.bmp -d robert!border:/pub/tartan.bmp
you are using Windows NT,
add the WS_FTP Pro folder The section below shows the breakdown of that command into the parts
to the path variable in the
System Environment. illustrated above. The command name wsftppro must always be placed in
Otherwise, change to your the beginning of the command.
WS_FTP Pro folder when
you use the commands.
Site Information
wsftppro -s local:c:\tartan.bmp -d robert!border:/pub/tartan.bmp
If you use a configured site from the command line, WS_FTP Pro uses the
User ID, Password, and Account Name you saved in the site configuration.
To do this, place the site folder and site profile in front of the remote
directory (this can be either the source or the destination). The site folder
and site profile has to be separated by the ! symbol. In the example above,
we use the border site profile stored in the robert folder.
If you have saved a password with the site, WS_FTP logs you on using the
saved password. If you have not saved a password with the site, you will
receive the regular password prompt, unless you use the -u and -w
arguments.
If you have saved an account name in the site configuration, the command
line logs you on using the saved account name. If you have not saved an
account name, you can use the -c argument to specify the account name
when you enter the command line. For example:
wsftppro -c account -s robert!border:/pub/tartan.bmp -d local:c:\armstrong\
If you do not use a configured site profile, you must put the IP address,
URL, or host name in the source or destination argument to connect to that
site. See the Transfer Source and Transfer Destination sections for
examples of command line commands that use this.
Transfer Source
wsftppro -s local:c:\tartan.bmp -d robert!border:/pub/tartan.bmp
The transfer source argument begins with the -s argument, followed by the
label for the source, and the path to the item or items being transferred. If
the source of the transfer is your local system, the source label is local. If
you are doing a download, the source label is either the site folder!site
name or the IP address, FTP URL, or Host name of the FTP site. For
example:
wsftppro -s robert!border:/pub/tartan.bmp -d local:c:\tartan.bmp
or
wsftppro -s ftp://username:password@border.ipswitch.com/pub/tartan.bmp -d
local:c:\armstrong\
or
wsftppro -u username -p password -s 156.21.50.78:/pub/tartan.bmp -d local:c:\
Transfer Destination
wsftppro -s local:c:\tartan.bmp -d robert!border:/pub/tartan.bmp
82 User’s Guide
WS_FTP Pro
wsftppro -s local:c:\tartan.bmp -d ftp://username:password@border.ipswitch.com/
pub/tartan.bmp
or
wsftppro -s local:c:\tartan.bmp -u username -w password -d 156.21.50.78:/pub/
tartan.bmp
or,
wsftppro -s local:c:\armstrong\tartan.bmp -d robert!border:/pub/
Notice that the second option omits the file name from the destination
location. You can do this when you want the transferred file to have the
same name as it does in the source location. However, note that you must
enter the trailing slash after the destination folder in order for this to work.
Downloading Files
Use the same command syntax as described above for downloading files,
except that, the source of the transfer is the remote system instead of your
local system.
wsftppro -s robert!border:/pub/tartan.bmp -d local:c:\armstrong\tartan.bmp
In the example above, we are connecting to the remote system using the
border site profile and downloading the tartan.bmp file to the armstrong
folder on our C: drive.
Renaming Files
To rename a file during the upload, enter a new file name after the
destination folder. For example, to upload the Tag.doc file and rename it
NewTag.doc on the FTP site, type:
wsftppro -s local:c:\sports\Tag.doc -d robert!border:/pub/drop/NewTag.doc
Or, to transfer all .doc files in the same folder, enter (at the MS-DOS
prompt or in a batch file):
wsftppro -s local:c:\sports\*.doc -d robert!border:/pub/drop/
To transfer multiple files not in the same folder, see “Multiple Folders or
Commands” on page 86.
Converting File Names to Lower Case
When uploading files, you can have WS_FTP Pro convert file names to
lower case by adding the -lower argument at the end of the command line.
For example, if the file you want to transfer is named Tag.doc, WS_FTP
Pro can upload it as tag.doc by using:
wsftppro -s local:c:\sports\Tag.doc -d robert!border:/pub/drop/ -lower
84 User’s Guide
WS_FTP Pro
Enclosing the Command Line in Quotes
If the file you want to transfer is named my tartan.bmp, use:
wsftppro -s "local:c:\armstrong\my tartan.bmp" -d "robert!border:/pub/my
tartan.bmp"
When you run the batch file named tartan.bat, WS_FTP Pro uploads the
tartan.bmp file to the border FTP site.
Note that using a batch file involves placing the command name wsftppro
at the beginning of each line in the file. Since each instance of the
command name starts the WS_FTP Pro application (and connects to the
FTP site), you would only use a batch file to work with one command at a
time. If, on the other hand, you want to issue a group of commands, follow
the procedure in “Multiple Folders or Commands” on page 86.
Remember that if a file name has a space in it, you must enclose that entire
argument in quotes.
Note that:
• The command name wsftppro must not appear in the text file
• Each line of text must contain only one command line.
• Each command line can contain any of the arguments described in
this chapter.
• If a file or folder name has a space in it, you must enclose that entire
argument in quotes.
86 User’s Guide
WS_FTP Pro
To use the examples shown previously, you could do a pre-scheduled
transfer by creating the following batch file:
Then, you could have the Scheduler run the auto10.bat file at 10:00 PM
each night.
Remember that if a file name has a space in it, you must enclose that entire
argument in quotes.
Extras
Here are a few more arguments and uses of the command line that some
users have found helpful. These are listed below.
To have WS_FTP Pro display a dialog box that prompts you for the
command line, type: wsftppro -ask
To launch the WS_FTP Pro Classic interface and default to the site
configuration for the border site: wsftppro -p robert!border
To prevent WS_FTP Pro from displaying error messages, use the -quiet
argument. This is useful if you want to do automated transfers when no
one is around to respond to a message. An example:
wsftppro -s local:c:\armstrong\tartan.bmp -d robert!border:/pub/tartan.bmp -
quiet
88 User’s Guide
WS_FTP Pro
Appendix A: FireScript Editor
This appendix describes the purpose and syntax of the FireScript
language and how it used to make an FTP connection through a
firewall.
What is a FireScript?
A FireScript allows you to customize the sequence of commands and
responses used to log in to an FTP server. This customization may be
necessary if your FTP server requires any non-standard commands to
be issued before or after logging in, or if certain types of firewalls are
between the client and the server.
FireScripts are written in a custom FireScript language, developed
specifically for use by WS_FTP Pro. FireScripts can perform the same
functions that WS_FTP Pro uses internally to connect to a host or
firewall type. FireScripts, however, let you determine if and when
these functions are used. In particular, the FireScript determines when
to autodetect the host type, and when to go secure with an SSL
connection. The script can choose whether or not to try the XAUTH
command, and also whether it is necessary to log in to a user account
after sending the user ID and password.
FireScript Components
A FireScript is broken into three sections: fwsc, comment and script.
As in a Windows ini file, the name of the section appears alone on a
line, in square brackets, followed by the rest of the section.
The fwsc section is internally structured with name=value pairs in the
same manner as a Windows ini section. It contains identifying
information about the script, and indicates what variables will be
required by the script.
The comment section is free-form text intended for human readers. It
is ignored by the script executable.
The script section contains the scripts executable portion and
conforms to the FireScript syntax.
FireScript Editor 89
WS_FTP Pro
Below is an example FireScript demonstrating this layout.
[fwsc]
author=Ipswitch
connectto=firewall
… other values not shown would typically include 'required=' and
'version='
[comment]
This is an example script that connects to an FTP proxy. It is
incomplete because many of the commands required to connect have
been deleted for clarity. The main purpose is to demonstrate the
organization of the FireScript into three sections.
[script]
send ("OPEN %HostAddress") {}
tryssl;
send (“USER %HostUserId”)
{
case (300..399) :
continue ;
case any :
return (false) ;
}
… most of script not shown due to the size.
label success;
gossl;
return (true);
The fwsc Section
The fwsc section lets you specify information about the script in a
manner similar to a Windows ini file. Most of the parameters are
present for informational purposes. This includes the author and
version fields. A few of the parameters are used by the script
executive in determining whether or not to show the login dialog, and
which IP address to use.
90 User’s Guide
WS_FTP Pro
The parser recognizes and stores values for the following parameters:
fwsc Parameters
preask A comma delimited list of fields that are not required but
which, if not present, will cause the login dialog to be
displayed.
FireScript Editor 91
WS_FTP Pro
The Connection Sequence
A request for connection to an FTP site comes from user actions in
either the Classic or Explorer interface, or by one of the WS_FTP Pro
utilities such as Find or Synchronize. Sometimes, additional
connections are requested by the Transfer Manager to resume or to
speed up transfers. All connections are created by the
CreateConnection function in the WS_FTP Pro API.
The connection sequence consists of two stages.
• Stage 1: Establish the connection with either the firewall or the
FTP server.
• Stage 2: Send commands to log in and authorize the connected
user. It is during this stage that the commands in a FireScript are
executed.
The first stage works the same whether WS_FTP Pro is using a
FireScript or using one of its internal firewall types. Before executing
the script, WS_FTP Pro checks the fwsc section for the list of fields
marked as required and preask. If any are missing, it displays the
login dialog. If the user fills in all required information and presses
Connect, WS_FTP Pro then checks the connectto field. Depending
on this field, it will either establish a connection to the firewall's IP
address and port, or to the FTP server's IP address and port. If this
field is not present, WS_FTP Pro defaults to the IP address of the
firewall, if present.
After the connection is established successfully, and a valid socket is
opened, WS_FTP Pro calls the FireScript executive to execute the
FireScript. If the FireScript logs in correctly and returns success, the
CreateConnection function returns the authorized connection to the
caller.
92 User’s Guide
WS_FTP Pro
Syntactically, FireScript statements are terminated by semicolons.
They may therefore extend across multiple lines, and you can have
multiple statements on a line. A string however, may not span lines.
The final closing quote must appear on the same line of source code as
the opening quote. For example, the code below is valid:
contains
(
lastreply,
"Welcome to my cool FTP site"
)
;
but the following is not:
contains ( lastreply, "Welcome to
my cool FTP site" );
FireScript Variables
Firescripts work with the login information provided by WS_FTP Pro.
This includes at least the user IDs and passwords, the IP address and
port of the FTP server, and sometimes the IP address and port of the
firewall. These fields are often read from a site profile, an FTP URL,
or from the command line. As described before, if some of the
required information is missing, the connect sequence presents the
login dialog so that the user can enter it interactively. The script
executive stores this information in a set of intrinsic variables before
beginning execution. In addition there are intrinsic variables that
contain the results of the last command issued. These are set by the
script executive after such statements are executed.
The syntax for using a variable depends on the statement or
expression in which it is used. Below is a list of all the intrinsic
variables:
FireScript Editor 93
WS_FTP Pro
FwPassword The user's password on the firewall. Required if
the user must log in to the firewall.
LastReply The text of the last response from the server. e.g.
"230 user logged in"
94 User’s Guide
WS_FTP Pro
String Expansion
Some of the commands and functions in the FireScript language take
strings as arguments. To these you may either pass a string variable or
a string literal surrounded by double quotes, e.g. “This is a string.” To
put a double quote inside a string, preface it with the percent sign ‘%’.
The percent sign ‘%’ is used as an escape character to embed
variables and quote characters in strings.
The sequence %% is replaced by a single %.
The sequence %" is replaced by ".
% followed by the name of a variable is replaced by the value of the
variable.
For example, the script statement below:
send ("OPEN %HostAddress")
If HostAddress is equal to “ftp.ipswitch.com” when this script is
invoked, the command will be expanded to:
send ("OPEN ftp.ipswitch.com")
the expression,
contains (lastreply, "%% full")
will be expanded at runtime to:
contains(lastreply "% full")
and the statement
send ("SITE SETLOG %"f:\log files\access.log%"
-clear")
the expanded string sent will be:
SITE SETLOG "f:\log files\access.log" -clear
Passing a string variable is equivalent to, but faster than passing a
string literal that expands the variable.
Example:
isempty(FwPassword)
is equivalent to but faster than
isempty("%FwPassword")
FireScript Editor 95
WS_FTP Pro
Function Expressions
Currently the FireScript language does not allow full-blown
expressions. It does include two function expressions with some
boolean operators for evaluating the state of variables. They are
contains and isempty. The boolean operators supported are not and
and.
The contains function takes two strings and returns true if the second
string is found in the first. The search is case sensitive. Both strings
are expanded first.
The isempty function takes a string and returns true if there are any
characters in the string. You can use it to test if a value was specified
for one of the intrinsic variables.
The not boolean operator reverses the value returned by the function
expression.
Example:
If the HostAccount variable contains the value ‘usr987i’
isempty (HostAccount) will return false but
not isempty(HostAccount) will evaluate to true.
The and boolean operator requires all specified conditions to be true.
Example, If the HostAccount variable contains a value such as
‘usr987I’
The last reply from the server is "230 User logged in, please send
account"
then the following expression will evaluate to true:
case (200..299) and not isempty(HostAccount)
and contains(lastreply, "ACCOUNT") :
FireScript Statements
The FireScript language includes several types of statements.
Statements cause actions to be taken, or direct the flow of execution of
the script. The following sections describe the types of statements.
96 User’s Guide
WS_FTP Pro
Switch Statements
The send statement and the xauth statement are called switching
statements, because they imply an immediate switch statement based
on the server response. The switch statement contains case statements
very similar to Java and C++ case statements, except the conditions
are not constants checked against a single expression.
A switching statement such as send and xauth is always immediately
followed by a set of case statements between curly braces { <case
statements> }. The set of case statements may be empty, in which case
there is nothing between the curly braces, but the braces must be
present.
Example of Switch Statement:
send ("USER %FwUserId") {}
The send statement takes a single argument, the string to be sent to the
server. The string is expanded before it is sent. The maximum legal
length for the expanded string is about 512 bytes, the maximum length
of an FTP line. The send command then waits on a response from the
server and evaluates the response against the conditions in each of the
enclosed case statements.
The xauth statement takes no arguments. It examines the welcome
banner for an xauth invitation supplied by WS_FTP server. If it is not
connected to WS_FTP server or cannot find the invitation, xauth does
nothing, and the case statements are not evaluated. If it does find the
invitation, it encodes the user ID and password and sends the xauth
command to the server. It then waits on the response and evaluates it
against the case statements just as the send command does.
Case Statements
Case statements are enclosed in switching statements. A case
statement lists a set of conditions that the server response must satisfy
for the case to be activated.
The list of conditions is followed by a colon ‘:’.
Case statements are processed in the order in which they are listed
until the first match is found.
FireScript Editor 97
WS_FTP Pro
Once a match is found for the conditions in a case statement, then the
nested statements are executed.
A case condition may be a list of FTP codes and code ranges, a
function expression, or one of the special cases, any and timeout.
If a case includes a list of ftp codes/ranges, the list must appear first,
followed by any function expressions. The list is comma separated
and enclosed in parentheses. Each item in the list must either be a
single 3-digit code, or a range specified by two 3-digit codes separated
by a double period ‘..’. The range is inclusive and it is recommended
that the lower bound be specified first.
The special cases any and timeout must appear by themselves.
Examples of Case Statements
The following case condition will match if the returned ftp code is
either 226 or 231.
case (226, 231) :
The following case conditions will match if the returned ftp code is
either 226 or 231, or between 250 and 299 inclusive. So 250 itself
will match, as well as 251, 252 etc. up to 299
case (226, 231, 250..299) :
The following case conditions will match if the returned ftp code is in
the 300s and the returned string contains the text “email address”.
case (300..399) and contains(lastreply, "email
address") :
The following case conditions will match if the returned ftp code is
500 or greater and the returned string contains the specified error
message
case (500..999) and contains(lastreply, "user
%HostUserId cannot login.") :
If a case contains more than one condition they must be separated by
and. The and operator specifies that all the listed conditions must be
satisfied. So in the previous example, the ftpcode must be between
500 and 599 AND the last reply must also contain the specified string.
Both must be true. If either is false, the case will not match.
98 User’s Guide
WS_FTP Pro
The not operator reverses the result of a function. We may for
example want to make sure that the last response does not contain a
certain string. For example:
case (500..599) and not contains(lastreply,
"server is busy") :
There is no or operator. The same logic may be applied by using
multiple case statements.
The following case condition will match if the send command timed
out.
case timeout :
Case any is the catch all case, and if present should be the last case in
the enclosing list. If it is followed by other case statements they will
never be evaluated.
For example, the following case condition will always match.
case any:
If case statements overlap and two case statements would match the
response, then the first one encountered will be executed.
Example:
case (200..299) and contains(lastreply, "please
send user account") :
...
case (200..299) :
...
If the case with the contains function appeared after the one without it,
it would never get evaluated.
Continue
Unlike C and C++, execution inside a case statement does not fall
through to the next case statement. Only the statements listed under
the activated case are executed. Then execution continues at the next
statement after the enclosing switching statement. The continue
statement jumps to the statement following the enclosing switching
statement. It does the same thing as a break, inside of a C/C++ switch
statement, except it is not absolutely necessary.
Switching statements may not be nested. That is, neither a send
statement nor an xauth statement may appear inside a case statement.
FireScript Editor 99
WS_FTP Pro
Jumps and Labels
A jump statement transfers execution to another part of the script. The
jump destination must be defined by a label that also appears in the
script. The Ipswitch example FireScripts use jumps to different code
sequences from inside case statements, so the code that gets executed
depends on which case was activated.
A label declaration consists of the word label, followed by the name
of the label and a semicolon.
A jump statement consists of the word jump, followed by the name of
the jump destination, and a semicolon.
A label may not appear inside a case statement. You can't jump into a
case statement.
Return
The return statement acts like a function in that it takes a single
parameter, either true or false to indicate success or failure. It
terminates script execution and returns to the caller. If it returns true,
the connection is assumed to be logged in and authorized. If it returns
false, the caller may either try again or abandon the connection.
Autodetect
The autodetect statement examines the last reply from the server to
help determine the host type of the FTP server to which it is
connected. Autodetect expects to examine the welcome banner so the
statement should be placed immediately after the welcome banner is
returned. Here are two example banners returned from two popular
FTP servers. Autodetect would detect the first as being a Microsoft
NT server, and the second as being an Ipswitch WS_FTP server.
220 tstsrvnt Microsoft FTP Service (Version 3.0).
220 tstsrvws X2 WS_FTP Server 1.0.5 (1737223651)
SSL Statements
The tryssl and gossl commands attempt to open a secure channel with
the server via SSL. The difference between them is that if gossl fails,
the script will terminate and return false, while if tryssl fails, the
script will continue. The commands can appear more than once in the
program. If a secure connection was not requested, or has already
been established, the commands will do nothing. If the commands fail
to go secure, they will display a message box to the user, asking the
user if she wishes to continue in the clear, try again for SSL later in
the sequence, or abandon the connection. If the user chooses to
continue in the clear, future calls to tryssl or gossl will do nothing.
When the script completes, the script executive checks the SSL status
of the connection to make sure that a request for a secure connection
was honored. In the site profile, if the user selected Use SSL, then the
script executive will issue a warning to the user if the connection is
not secure. At this point, the user may abandon the connection. This
warning is issued if a secure connection was attempted and the user
chose to continue in the clear.
The placement of the attempts to open an SSL channel can be very
important, depending on the type of firewall through which the script
is connecting.
false
switch if for
password or
return continue
contains isempty
LastReply
“MDTM”
The current FTP site does not support Month-Day-Time-Marking; this means
that after the file was uploaded, WS_FTP attempted to preserve the date and
time, but the FTP site does not support this feature. However, the files will
transfer correctly. Note that this is not a fatal error, even though it displays in
red.
You can disable this option by selecting Preserve filetime on upload
(MDTM support required) on Site Properties: Session.
Index 109
WS_FTP Pro
M Request Properties 43 synchronizing files and folders
router-based firewalls 78 55
MDTM error 106
system requirements 2
messages
suppressing with the S
command line 87 scheduling transfers 75, 86 T
messages, error 105 scripting 69 text files 28
Microsoft Internet Explorer 7 example 71 Thumbnails 32
mirroring files and folders 55 Scripting Utility 69 time. See dates and times
modem 2 scripts, writing and debugging Transfer Arrows 13
modes for UNIX files 36 70 Transfer Manager 41
Month-Day-Time-Marking server Transfer Manager Dialogs 41
106 See also FTP site Transfer Manager Log
MS-DOS prompt 81 server (defined) 1 Window 44
SITE hostname (firewall) 78 Transfer Modes 28
N site. See FTP sites transfer modes
size of file as criteria for defined 31
name of file as criteria for
finding file 67 startup 31
finding files 65
software patches 8 transferring files
names (file) with spaces 84
spaces in file names See also downloading,
Netscape Navigator 7
transferring with uploading
New Features in version 7.0 2
command line 84 ASCII 28
SSL binary 28
O generating a certificate 48 compressed 28
Online Help 16 selecting a certificate 50 HTML 28
trusted authorities 50 images 28
P adding a certificate 51 jpg 28
exporting a certificate photographs 28
Passive Transfers 23
51 pictures 28
passive transfers 78
removing a certificate postscript 28
patches 8
52 scheduling 86
permissions for UNIX files 36
SSL (definition) 45 text 28
postscript files 28
certificate 46 with spaces, using
pre-scheduled transfers 86
certificate signing request command line 84
Proxy OPEN (firewall) 78
46 zipped 28
public folder 4
client 46 Transparent (firewall) 78
private key 46
Q public key 46 U
queuing transfer tasks 73, 86 session key 46
UNIX 36
Queuing Utility 73 startup
UNIX FTP sites 36
transfer mode 31
upgrades 8
suppressing error messages
R using the command line 87
upload 25
Remote System (defined) 5 upload (defined) 1
Synchronize Utility 55
110 Index
WS_FTP Pro
Upload Wizard 26
URL (defined) 6
“User access denied” 107
USER fireID@remoteHost
(firewall) 78
user interfaces of WS_FTP Pro
4
USER remoteID @remoteHost
fireID (firewall) 78
USER remoteID@fireID
@remoteHost (firewall) 78
USER with no logon (firewall)
78
Utility
Find 63
Queuing 73
Scripting 69
Synchronize 55
V
viewing
files and folders 5
W
Web browser integration 6
wildcard characters for finding
files and folders 65
World Wide Web 1
WS_FTP Find Utility 63
WS_FTP Pro Development Kit
8
WS_FTP Pro Toolbar 14
WS_FTP Queuing Utility 73
WS_FTP Scripting Utility 69
WS_FTP Server 7
WS_FTP Synchronize Utility
55
Z
zip files
transferring 28
Index 111
WS_FTP Pro
112 Index
WS_FTP Pro