Ws FTP 70 Manual
Ws FTP 70 Manual
Users Guide
Software Version 7.0
Ipswitch, Inc.
Ipswitch, Inc.
81 Hartwell Ave
Lexington, MA 02421-3127
Phone: 781-676-5700
Fax:
781-676-5710
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 information 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 2001 by Ipswitch, Inc. All rights reserved. IPing, the IPing logo, 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
December 1996
July 1997
February 1998
October 1998
May 2000
June 2001
First Edition
Second Edition
Third Edition
Fourth Edition
Fifth Edition
Sixth Edition
Seventh Edition
Table of Contents
Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Why FTP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
How FTP Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
New in WS_FTP Version 7.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Installing WS_FTP Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Logging Onto an FTP Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Interfaces for Windows 95, 98, 2000, ME 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
Uninstalling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Accessibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 2: Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Making your First Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Connection Dialog Toolbar and Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Connection Dialog Boxes and Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Transferring a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
WS_FTP Pro Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Anonymous Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Using the Help System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 3: Transferring Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Ways to Transfer Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Using the Transfer Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Drag and Drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Copy and Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Batch Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Using the Transfer Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Transfer Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Passive Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 4: Managing Files and Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Viewing and Navigating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Working with Files and Folders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Click and Drag for Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Contents
WS_FTP Pro
iii
Contents
WS_FTP Pro
FireScript Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
The fwsc Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
The Comment Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
The Script Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
The Connection Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
The FireScript Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
FireScript Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
String Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Function Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
FireScript Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Switch Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Case Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Examples of Case Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Continue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Jumps and Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Return. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Autodetect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
SSL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
FireScript Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
FireScript reserved words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
FireScript statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
FireScript intrinsic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
FireScript intrinsic variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Appendix B: Textual Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Blocking call canceled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Cannot create file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Cant get xxx host entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Cant set guest privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Connection refused . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Directory identifier unavailable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Disk quota exceeded. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Failed data channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
File too large to download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Illegal port command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Invalid page fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Logon failure; Quitting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
MDTM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Port command failed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
User access denied . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
vi
Contents
WS_FTP Pro
Chapter 1: Introduction
This chapter offers an introduction to WS_FTP Pro, a brief
description of File Transfer Protocol, system requirements, the
installation procedure, information about software updates, and
instructions for giving feedback to Ipswitch, Inc.
Why FTP?
Using This Book
The WS_FTP Users Guide
is a resource you should
use to familiarize yourself
with the different features
of WS_FTP Version 7.0.
FTP site A
FTP site B
Your PC
Redesigned interface.
System Requirements
WS_FTP Pro requires the following system resources:
Users Guide
WS_FTP Pro
The installation of WS_FTP Pro is the same for new users, those who
are upgrading from a previous version of WS_FTP Pro, and those who
are replacing an evaluation version with a purchased version.
To install WS_FTP Pro from a downloaded file:
1
Introduction
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 email 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.)
Users Guide
WS_FTP Pro
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
WS_FTP Pro
Files and
folders in the
current folder
Browser Integration
Browser Integration is
NOT compatible with
Netscape 6.
Users Guide
WS_FTP Pro
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.
Introduction
WS_FTP Pro
Select the desired patch file; the last three digits of the file name
indicate the version number. For example, wsftp606.exe is the
patch file to update earlier versions to WS_FTP Pro 6.06. Read
the accompanying text file (for example, wsftp606.txt) to verify
that you have located the correct file.
Transfer the patch file and place it in a folder other than your
WS_FTP Pro folder or your Windows Temp folder. To update the
software, double-click the patch file and follow the instructions.
Users Guide
WS_FTP Pro
Click the Service & Support link at the top right of the
Web page.
Click Patches and Upgrades, and then click the link for the
product.
Save the patch file in a folder other than your WS_FTP Pro
folder or your Windows Temp folder.
Uninstalling
The uninstall function can remove all files associated with WS_FTP
Pro from your PC, including your configured sites. It also removes the
WS_FTP Pro Explorer icon from your desktop.
To uninstall WS_FTP Pro:
1
Click the Start button and select Programs -> WS_FTP Pro
Uninstall.
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
WS_FTP Pro
10
Users Guide
WS_FTP Pro
How to...
Make your first
connection:
Getting Started
WS_FTP Pro
11
Save. Click this button to save the site information. You should do
this when the site is first configured, and any time host information is
edited.
Advanced Properties. Click this button for more site configuration
options. See the Online help for more information on the Site
properties.
Connect. Click this button to connect to the selected site.
Cancel. Click this button to close the Connection dialog box.
12
Users Guide
WS_FTP Pro
Getting Started
WS_FTP Pro
13
Transferring a file
How to...
Transfer a file:
Once you have connected to a site, you
are ready to transfer a file.
Downloading a File
Uploading a File
1 Select the directory you want to
upload the file to in the Remote
System list.
2 In the Local System list, select the
file you want to upload.
3 Click the upload transfer arrow. It is
the one that looks similar to: -->
4 When the file is uploaded, it will
appear in the Remote System list.
The following are boxes and window structures that are important in
learning how to make an FTP transfer:
Local System. This box displays 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. This box 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.
14
Users Guide
WS_FTP Pro
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
WS_FTP Pro Toolbar
Connect. Click this icon to select or configure a site to connect to,
using the Connection Dialog box.
Disconnect. Click this icon to disconnect from a site.
FTP Manager. Click this icon to display the Transfer Manager. For
more information, see Chapter 6: WS_FTP Transfer Manager on
page 29.
Batch Mode. Click this icon to place WS_FTP in Batch Mode. In
this mode, selected files will be added to the Transfer Manager to
be transferred later.
Options. Click this icon to access WS_FTP Program Options.
Large Icons. Click this icon to change the layout of the list pane to
show file names along with large icons associated with the file
type.
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.
Help. Click this icon to access the WS_FTP Pro online help
system.
Getting Started
WS_FTP Pro
15
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.)
16
Users Guide
WS_FTP Pro
The body of
the help topic
appears in this
pane.
Click on blue
words to jump
to another topic.
Click green to
access a drop
down list.
Transfer Modes
Download Arrow
Restarting Transfers!
Some FTP Servers allow
clients to restart transfers
that have failed or been
interrupted due to a lost
connection, cancellation, or
other reason.
For specific directions on
this process, see the
Transferring Files section
of the Online help.
Transferring Files
WS_FTP Pro
17
When you release the mouse button, WS_FTP Pro attempts to transfer
the file to that location.
Confirming Overwrites
Most sites allow you to
overwrite or replace a file
without giving you any
kind of visual warning.
Through WS_FTP Pro, you
can set it up so that a dialog
box is displayed to warn
you that you are about to
overwrite a file.
For specific directions on
this feature, see the
Transferring Files section
of the Online help.
Transfer Modes
There are three modes that WS_FTP Pro uses to transfer a file from
place to place. Depending on the type of file, you may have to select
this mode before you attempt to transfer a file.
Transfer Mode
18
Users Guide
WS_FTP Pro
These modes are called ASCII, Binary, or Auto. The following chart
shows the icon that should be chosen for the described type of file.
Ascii Mode
Binary Mode
Auto Mode
Passive Transfers
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:
Transferring Files
WS_FTP Pro
19
20
Users Guide
WS_FTP Pro
Address Bar
Local System
Remote System
Up one Level
Local Directory
Remote
Directory
Mapped Drives
Refresh Buttons
The Address bar displays the complete path to the FTP site directory
you are currently connected to. You can edit this path manually to
navigate to the folders listed in the Remote Directory listing. When
you do this, the Address bar stores the last five paths that have been
entered.
21
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.
Click on one of the Mapped Drives icons in the Local Directory
listing to access that drive.
The right side of the WS_FTP Pro window shows the Remote System
(FTP site) you are connected to. The Remote Directory listing
displays everything that is visible in the folder identified in the
Remote System box.
The way these listings look can be changed by the Display Icons, and
can be refreshed (to make sure you are looking at the most up-to-date
list of files and folders) by clicking the Refresh button next to the
directory list box.
You can use the ChgDir (Change Directory) button to navigate by
doing one of the following:
To get a dialog box that asks for the folder name, make sure
nothing is selected in the list box and click the ChgDir
button.
When you see the dialog box, you can also change drives by
entering a drive letter followed by a colon (for example, d:).
22
Users Guide
WS_FTP Pro
WS_FTP Pro gives you a variety of features that make it quick and
easy to organize, manipulate, and delete files and folders.
The graphic below points out key features used during these tasks.
Connection
buttons (Connection
Bars)
Folder
Files
23
You can change modes for a UNIX file on an FTP site, provided you
have permission.
1
Background Information
Permissions can also be expressed as three- or four-digit values;
for example: 1644.
24
Users Guide
WS_FTP Pro
Four-digit values are used in the WS_FTP Pro log, in the message
area, and by some system administrators and ISPs.
The table below shows how WS_FTP Pro check box options
correspond to the last three digits. The third column shows the
possible values for Owner, Group, and Other as viewed in the tenposition value in the first column of a directory list for a UNIX site.
Selected options in
WS_FTP Pro
none
Execute
Write
Write, Execute
Read
Read, Execute
Read, Write
Read, Write, Execute
Permissions in
directory list
----x
-w-wx
r-r-x
rwrwx
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.
25
d
First position
indicates
whether item
is a file (-,s,S,
or t) or
directory (d)
26
Users Guide
WS_FTP Pro
rwx
Positions 2-4
indicate
Owner
permissions:
read, write,
execute.
r-x
Positions 5-7
indicate Group
permissions:
read and
execute.
--x
Positions 8-10
indicate Other
permissions:
execute only.
Overview
Look for more detailed
information in the Online
Help. Most sections are
applicable to the Explorer
Interface.
Site Icon
Explorer Interface
WS_FTP Pro
27
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.
Transferring Files
Transferring files in the Explorer Interface is very much like the dragand-drop feature of the Classic interface. To transfer a file:
28
Users Guide
WS_FTP Pro
Connect to a site.
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.
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 a Windows Explorer window.
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 Windows Explorer window.
How to...
Use the Batch Mode.
You can use the Batch Mode to add
requests to the Transfer Manager
(Classic Interface only.)
Time Left. The estimated time left until the transfer is complete.
WS_FTP Transfer Manager
WS_FTP Pro
29
How to...
Request Properties
Pause a transfer
You can double click any item on the Transfer Manager dialog to
view the Request Properties dialog for that item.
How to...
Remove an item
To remove an item from the Transfer
Manager:
Schedule a transfer
Submit Time. The date and time the file was submitted.
Start Time. The date and time the file transfer began.
How to...
30
Users Guide
WS_FTP Pro
Log Window
To view the log for an item, select the item, then from the Transfer
menu, select Log. The following window appears:
The log window will contain all actions that have been initiated for
the selected transfer, including pause and resume.
Refer to Appendix B for descriptions of error messages that may
appear in the log.
31
32
Users Guide
WS_FTP Pro
What is 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.
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
WS_FTP Pro
33
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
clients 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 client. If the connection is accepted, or if the server is not set up
to receive certificates, it decodes the session key from the client 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 clients certificate
must be signed by the servers 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 clients 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.
34
Users Guide
WS_FTP Pro
Be sure to select the Secure (SSL) option when you follow the
directions for configuring a site.
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.
If that certificate is not listed as a trusted authority, the NonTrusted Authority dialog box appears.
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.
When you receive the file, follow the directions for Selecting a
Certificate on page 37, selecting the new certificate to go in the
Certificate box.
SSL Utility
WS_FTP Pro
35
Generating a Certificate
To create an SSL certificate:
1
From the Tools menu, select Configure SSL. The SSL Utilities
window appears.
Enter a name in the Certificate Set Name box. This will be the
name of the certificate that is generated by WS_FTP Pro.
36
Users Guide
WS_FTP Pro
Country. The country you are in. This must be a valid two letter
country code. (Ex. US)
E-mail. E-mail address of the person the certificate belongs to.
Unit. Name of organizational unit. (Ex. Research and
Development)
6
Selecting a Certificate
The Certificate Selection tab is used to choose which private key and
certificate you want to use during SSL connection negotiations. If a
new certificate has not been created, follow the directions for
Generating a Certificate on page 36.
SSL Utility
WS_FTP Pro
37
Enter the pass phrase associated with that certificate in both the
Pass Phrase and the Pass Phrase Confirmation boxes. A pass
phrase can be any combination of words, symbols, spaces or
numbers. It is case sensitive and must be written exactly the same
way each time it is used.
Without the correct pass phrase in both boxes, the certificate and
private key cannot be verified and the selection cannot be saved.
Trusted Authorities
The Trusted Authorities tab stores a list of certificate names that are
recognized by 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.
38
Users Guide
WS_FTP Pro
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.
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
Click OK.
Removing a Certificate
To remove a certificate:
1
Click Remove.
SSL Utility
WS_FTP Pro
39
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.
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.
40
Users Guide
WS_FTP Pro
A Word of Caution
The Synchronize Utility can easily erase or overwrite large numbers
of files without prompting you.
To verify that the Synchronize Utility will do what you want, please
run any new control files in test mode before running them for real.
You can then view the contents of the status window to verify
that the control file will do what you expect.
You should look for lines such as:
# deleting filea.ext
# sending fileb.ext 19960217/00:00
(19950217/00:00)
# receiving filec.ext 19960217/00:00
(19950217/00:00)
41
Example
The following is an example of how you might use the WS_FTP
Synchronize Utility.
When you click the Go button, the control file named rarmstrong (it is
at the end of the path in the Control file name box) is executed
according to the parameters set on the WS_FTP Synchronize Utility
screen:
42
Users Guide
WS_FTP Pro
Exclusions
WS_FTP Synchronize has the ability to exclude directories and/or
files during the synchronize process. This exclusion information is
entered in the Exclude box. The entered information is in the form of
a comma separated set of values. Spaces are interpreted as part of the
exclusion, so do not put spaces after (or before) a comma unless they
are part of the files/directories you wish to exclude. Wildcards
consisting of * and? can be used in directory and file names. An
example of this is shown below:
/mydir/*.exe,mydir\,m*ir\,\m?dir\,/mydir/
nextdir/myfil?.*,mydir\*.exe
An explanation of each exclusion follows:
/mydir/*.exe
An absolute file exclusion. This will exclude all .exe files in the
mydir directory, but the path is taken from the root of the file system.
mydir\
A relative directory exclusion. This will exclude any directory
named mydir anywhere in the file system.
\m?dir\
An absolute directory exclusion. This will exclude all directories
that match the mask m?dir, but the path is taken from the root of the
file system. The ? is a substitute for any single character.
m*ir\
43
44
Users Guide
WS_FTP Pro
Click Find Now. The Find Utility connects to the FTP site and
searches according to your criteria.
45
For example, if you search the Ipswitch FTP site for a file named
filelist.txt, the following results are displayed.
The search
found this
file.
Transfer it.
To transfer a file:
46
Users Guide
WS_FTP Pro
In the dialog box above, select the file you want to transfer, and
select Transfer from the right-mouse menu. A browse window
appears.
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
47
48
Users Guide
WS_FTP Pro
Click OK. The Look In box is filled in with the path of the
selected folder.
In the Size is box, you can select At least or At Most then enter the
file size in kilobytes in the KB box.
49
50
Users Guide
WS_FTP Pro
Scripts can also have some limited flow control. They can:
Suppose you post weekly reports on your companys FTP server for
your co-workers in other cities to download. Lets assume you place
the current weeks reports in a folder named Current. You could
create a script that:
You can also create scripts for downloads that you do repeatedly.
Using Scripting
Start the Scripting Utility by doing one of the following:
51
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 95,
Windows 98, and Windows ME. If youre using Windows NT or
Windows 2000, add the WS_FTP Pro folder to the path variable in the
System Environment.
Users Guide
WS_FTP Pro
Example
In the following example, the script:
1
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.
53
54
Users Guide
WS_FTP Pro
Once you are in the Scheduler window, you are ready to set up a file
transfer task. You can:
Scheduler
WS_FTP Pro
55
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.
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
56
Users Guide
WS_FTP Pro
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.
In the Start Time box, enter the time of day you want the task to
be run.
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.
In the Start Time box, enter the time of day you want the task to
be run.
Scheduler
WS_FTP Pro
57
58
Users Guide
WS_FTP Pro
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.
In the Start Time box, enter the time of day you want the task to
be run.
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
WS_FTP Pro
59
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.
Type of Firewall
Proxy OPEN
SITE hostname
Transparent
USER fireID@remoteHost
USER remoteID@fireID
@remoteHost
USER remoteID
@remoteHost fireID
Configuring a Firewall
For some router-based
firewalls, you will want to
use passive mode, in which
the data connections are
established by the FTP
client (WS_FTP Pro) rather
than by the FTP site.
60
Users Guide
WS_FTP Pro
To enter firewall information, you will need to get data about your
firewall from your network administrator. For more information, see
Firewall Types above.
In the Classic Interface, on the Connection dialog, configure a
firewall as follows:
1
Enter a name for the firewall as well as the firewalls official host
name or IP address.
Select a Type.
Click Save.
You can now assign the firewall configuration to the site, as
described in Using a Configured Firewall below.
Using Firewalls
WS_FTP Pro
61
Click Save.
You can now assign the firewall configuration to the site, as
described below.
Make sure you are on the Host Info tab (not the Firewall tab).
62
Users Guide
WS_FTP Pro
Select a site.
Make sure you are on the Host Info tab (not the Firewall tab).
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:
Written out, a command using this format would look like this:
wsftppro -s local:c:\tartan.bmp -d robert!border:/pub/tartan.bmp
The section below shows the breakdown of that command into the parts
illustrated above. The command name wsftppro must always be placed in
the beginning of the command.
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
Using the Command Line
WS_FTP Pro
63
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:[email protected]/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
64
Users Guide
WS_FTP Pro
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 border:/pub/tartan.bmp -d robert!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 as you upload it, 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
65
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 68.
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
66
Users Guide
WS_FTP Pro
Instead of typing the command at the MS-DOS prompt, you may find it
more expedient to enter the command line into a batch file (a text file with
the file extension .bat). This makes it easier to correct mistakes and to run
the same command again.
You run the command by invoking the .bat file at the MS-DOS prompt,
double-clicking the icon for the .bat file from within Windows, or running
the .bat file from another application (such as WS_FTP Pro Scheduler).
Here is a batch file (for the example at the beginning of this chapter) as
viewed from a Windows text editor:
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 68.
Remember that if a file name has a space in it, you must enclose that entire
argument in quotes.
Using the Command Line
WS_FTP Pro
67
Note that:
The command name wsftppro must not appear in the text file
If a file name has a space in it, you must enclose that entire argument
in quotes.
68
Users Guide
WS_FTP Pro
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.
The command you enter (at the MS-DOS prompt or in a batch file) is:
wsftppro -m DirStruct.txt
69
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
Summary
Here is a list of all arguments you can use in the command line.
Arguments
(alphabetical)
-ascii
70
Users Guide
WS_FTP Pro
When to use
Use -ascii when transferring text files.
-binary
-c account
-d
path_and_filename
Important
restrictions
-lower
Use -lower to have WS_FTP Pro convert file names to lower case letters when
you transfer from your PC to an FTP site.
-m text_file
Use -m to do transfers that involve multiple source locations, multiple destinations, or multiple commands. text_file is
the name of the file that contains the commands.
-p site_name
-quiet
-s
path_and_filename
-u userID
-w password
Use -w to identify password as the password to use to connect to the ftp site.
The -p argument
must precede all
arguments except
-i.
71
72
Users Guide
WS_FTP Pro
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 executive.
The script section contains the scripts executable portion and
conforms to the FireScript syntax.
FireScript Editor
WS_FTP Pro
73
[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.
74
Users Guide
WS_FTP Pro
The parser recognizes and stores values for the following parameters:
fwsc Parameters
Parameter
author
version
verdate
required
preask
connectto
FireScript Editor
WS_FTP Pro
75
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 okay and returns success, the
CreateConnection function returns the authorized connection to the
caller.
76
Users Guide
WS_FTP Pro
FireScript Variables
Firecripts 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 Intrinsic Variables
Variable
FwUserId
FireScript Editor
WS_FTP Pro
77
FwPassword
FwAccount
FwAddress
HostUserId
HostPassword
HostAccount
HostAddress
LastFtpCode
LastReply
78
Users 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
WS_FTP Pro
79
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.
80
Users 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, andthe 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 stataments are processed in the order in which they are listed
until the first match is found.
FireScript Editor
WS_FTP Pro
81
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
satisifed. So in the previous example, the ftpcode must be between
500 and 599 AND the lastreply most also contain the specified string.
Both must be true. If either is false, the case will not match.
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
82
Users Guide
WS_FTP Pro
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
WS_FTP Pro
83
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)
If connection was made directly to the host FTP server and the
welcome banner was already returned before the script begins
execution, then autodetect should be the first statement in the script.
If the connection was made to the firewall and the welcome banner
from the host ftp server becomes available later in the script, the
84
Users Guide
WS_FTP Pro
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.
FireScript Editor
WS_FTP Pro
85
tryssl
autodetect
send
xauth
case
continue
and
not
any
timeout
return
jump
label
true
false
86
Users Guide
WS_FTP Pro
switch
if
for
next
while
loop
break
function
int
bool
string
var
password
or
FireScript statements
gossl
tryssl
autodetect
send
xauth
jump
return
continue
isempty
FwPassword
FwAccount
FwAddress
HostUserId
HostPassword
HostAccount
HostAddress
LastFtpCode
LastReply
FireScript Editor
WS_FTP Pro
87
88
Users Guide
WS_FTP Pro
Disconnect from the FTP site if you are currently connected to it. Then
turn on passive mode. After you have done this, try reconnecting to the
site.
If you still receive this error message, set the network timeout for the
site to 120 in the Classic interface:
If you are connected to a site, select Disconnect from the File menu.
If you still receive this error after making the above changes, try the
command line FTP (not the WS_FTP Command Line) and see if you
can connect and how long it takes. Once you know how long it takes to
connect, enter this time into the Network Timeout setting on the
Advanced tab of the site properties as described above.
If you still cannot connect please contact the FTP server administrator
for assistance.
Textual Error Messages
WS_FTP Pro
89
Connection refused
Either the host is not running an FTP server program, or else the FTP site is
accepting connections only from certain clients.
90
Users Guide
WS_FTP Pro
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, files
transferred correctly. Note that this is not a fatal error, even though it
displays in red.
91
92
Users Guide
WS_FTP Pro
Index
unavailable error 90
Disk quota exceeded error 91
download (defined) 1
Numerics
530 user access denied 92
A
accounts on FTP sites 4
anonymous FTP 4
ASCII files 19
attributes for UNIX files 24
autoexec.bat 63
automating file transfers 68
B
batch files 67
bitmaps 19
Blocking call canceled error
89
C
Cant get xxx host entry
error 90
Cant set guest privileges
error 90
Cannot create file error 90
cgi files 19
chmod (command) 24
Classic interface (defined) 5
client-server 1
command line 63
command prompt 52, 63
Connection refused error 90
D
data connection 60
dates and times
criteria for finding files
and folders 48
Directory identifier
E
Editor/Debugger window 52
e-mail address 4
error messages 70, 89
exe files 19
executable files 19
Explorer Interface 27
Explorer interface (defined) 5
F
failed data channel error 91
file name as criteria for finding
files 47
file names with spaces 66
file size as criteria for finding
files 49
File too large to download
error 91
files
ASCII 19
compressed, transferring
19
executables, transferring
19
htm 19
html 19
postscript 19
Find Utility 45
finding files and folders 45
FireScript 73
firewall types 60
firewalls 59
router-based 60
folders
with subfolders 69
FTP (File Transfer Protocol)
client (defined) 1
server (defined) 1
G
gateways 59
group permissions 25
H
hierarchical folders. See
folders
host name of firewall 60
htm files 19
html files 19
HTTP 1
I
Illegal port command error
91
installing WS_FTP Pro 3
interfaces of WS_FTP Pro 4
Invalid page fault 91
IP address of firewall 60
Ipswitch, Inc.
getting software updates 8
giving feedback 8
web site 8
J
jpg files 19
L
local area network 1
Local System (defined) 5
logging on 3, 4
Logon failure. Quitting. 91
Index 93
WS_FTP Pro
MDTM error 91
messages
suppressing with the
command line 70
messages, error 89
Microsoft Internet Explorer 7
mirroring files and folders 41
modem 1
modes for UNIX files 24
Month-Day-Time-Marking 91
MS-DOS prompt 63
N
name of file as criteria for
finding files 47
names (file) with spaces 66
Netscape Navigator 7
New Features in version 7.0 2
O
owner permissions 25
P
passive transfers 60
patches 8
permissions for UNIX files 24
Port command failed 92
port of firewall 61
postscript files 19
pre-scheduled transfers 68
prompts 41
Proxy OPEN (firewall) 60
public folder 4
Q
queuing transfer tasks 55, 68
Queuing Utility 55
94
Index
WS_FTP Pro
S
scheduling transfers 57, 68
scripting 51
example 53
Scripting Utility 51
scripts, writing and debugging
52
server
See also FTP site
server (defined) 1
SITE hostname (firewall) 60
site. See FTP sites
size of file as criteria for
finding file 49
software patches 8
spaces in file names
transferring with
command line 66
SSL
generating a certificate 36
selecting a certificate 37
trusted authorities 38
adding a certificate 39
exporting a certificate 39
removing a certificate 39
SSL (definition) 33
certificate 34
certificate signing request
34
client 34
private key 34
public key 34
session key 34
startup
transfer mode 21
sticky bit 25
suppressing error messages
using the command line 70
Synchronize Utility 41
synchronizing files and folders
41
system requirements 2
T
text files 19
time. See dates and times
Transfer Manager 29
transfer modes
defined 21
startup 21
transferring files
See also downloading,
uploading
ASCII 19
binary 19
compressed 19
HTML 19
images 19
jpg 19
photographs 19
pictures 19
postscript 19
scheduling 68
text 19
with spaces, using
command line 66
zipped 19
Transparent (firewall) 60
U
uninstalling WS_FTP Pro 9
UNIX 24
UNIX FTP sites 24
upgrades 8
upload (defined) 1
URL (defined) 6
User access denied 92
USER fireID@remoteHost
(firewall) 60
user interfaces of WS_FTP Pro
4
USER remoteID @remoteHost
fireID (firewall) 60
USER remoteID@fireID
@remoteHost (firewall) 60
USER with no logon (firewall)
60
Utility
Find 45
Queuing 55
Scripting 51
Synchronize 41
V
viewing
files and folders 5
W
Web browser integration 6
wildcard characters for finding
files and folders 47
wildcards
in command line 69
World Wide Web 1
WS_FTP Find Utility 45
WS_FTP Pro Development Kit
8
WS_FTP Queuing Utility 55
WS_FTP Scripting Utility 51
WS_FTP Server 7
WS_FTP Synchronize Utility
41
Z
zip files
transferring 19
Index 95
WS_FTP Pro
96
Index
WS_FTP Pro