WS FTP Tools Guide
WS FTP Tools Guide
WS FTP Tools Guide
Tools Guide
Contents
CHAPTER 1 Introduction
Ways to Automate Regular File Transfers .......................................................................... 5
Check Transfer Status and Logs......................................................................................... 6
Building a List of Files for Transfer...................................................................................... 6
Transfer Files as a Compressed Archive ............................................................................ 7
Transfer and Append to a Remote File ............................................................................... 7
How to Speed Up Transfer of Large Files ........................................................................... 7
Integrating WS_FTP with a Browser or E-Mail.................................................................... 8
Search an FTP Site for a File or Folder .............................................................................. 9
Using the Upload Wizard .................................................................................................... 9
Transfer Destination................................................................................................. 61
File Transfer Options......................................................................................................... 61
Uploading Files ........................................................................................................ 61
Downloading Files.................................................................................................... 62
Renaming Files ........................................................................................................ 62
Adding Current Date and Time Information to File Names ...................................... 62
Compressing Files ................................................................................................... 63
Transferring multiple files from the same location ................................................... 63
Converting File Names to Lower Case .................................................................... 63
Post Transfer Actions............................................................................................... 63
Post Transfer Rename Macros ................................................................................ 64
File Transfer Modes ................................................................................................. 65
Transferring Files and Folders with Spaces in the Name.................................................. 66
Enclosing the Command Line in Quotes.................................................................. 66
Using the Short Name.............................................................................................. 66
Using a Batch File ............................................................................................................. 66
Multiple Folders or Commands ......................................................................................... 67
Pre-scheduled Transfers ("Automated Transfers") ........................................................... 67
Extras ................................................................................................................................ 68
Summary of Arguments .................................................................................................... 69
Return Codes .................................................................................................................... 70
Index
iii
CHAPTER 1
Introduction
In This Chapter
Ways to Automate Regular File Transfers................................. 5
Check Transfer Status and Logs ............................................... 6
Building a List of Files for Transfer ............................................ 6
Transfer Files as a Compressed Archive .................................. 7
Transfer and Append to a Remote File ..................................... 7
How to Speed Up Transfer of Large Files ................................. 7
Integrating WS_FTP with a Browser or E-Mail .......................... 8
Search an FTP Site for a File or Folder..................................... 9
Using the Upload Wizard........................................................... 9
This guide introduces tools that can help you automate regular file transfer tasks,
troubleshoot problems, verify transfers, and customize the way you work with Ipswitch
WS_FTP 12.
This chapter shows some of the situations where the tools can help you. The following
chapters present more detailed information about the tools.
You can open any of these tools from the Tools menu.
Bulk Import
In the Transfer Manager, select the requests you want to execute. Hold down the
Ctrl key to select multiple requests.
7 After you take the client out of batch mode, it will execute the transfers.
When in Multipart Mode, WS_FTP splits large files into smaller segand downloads all
segments via different, yet concurrent, connections. This decreases the total download
time for large individual files.
Multipart works with download files only. It does not work with SSL connections.
If there are no segments listed under the file being downloaded, then the file is not
large enough to be divided.
To turn off MultiPart Mode, select Tools > Multipart Mode again.
WS_FTP does:
Bulk Import
In Windows Explorer, select the files or folders you want to upload, then rightmouse 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.
From the Start menu, select Programs > Ipswitch WS_FTP 12 > Utilities >
WS_FTP Upload Wizard. The Wizard opens and is ready for you to add the files
you want to upload.
CHAPTER 2
Source. The path and name of the file or folder that is to be transferred.
11
Status. The current status of the listed item. The icon shows the type of event.
Progress. How complete the event indicated in Status is. Click the button next to
Progress to either start or pause the transfer.
Time Left. The estimated time left until the transfer is complete.
Connect to a server.
Select Tools > Batch Mode or click Batch Mode in the toolbar.
Select a file or files and click the transfer arrow. The file will be placed in the
Transfer Manager.
4 After you have added all of the files to the batch, select Tools > Batch Mode again
to take WS_FTP out of batch mode.
5 In the Transfer Manager, select the requests you want to execute. Hold down the
Ctrl key to select multiple requests.
6 After you take the client out of batch mode, it will execute the transfers.
12
Bulk Import
Request Properties
You can double-click any item on the Transfer Manager to view the Properties dialog for
that item.
Elapsed Time. The amount of time that has passed since the transfer began.
Contains. Number of files and folders contained in the request. (Only displayed
when a folder is selected.)
Transfer Mode. Whether the file was transferred in binary or ASCII mode. (Not
displayed when a folder is selected.)
Transfer History
The Transfer History tab displays a list of successful transfers. This list can be sorted by
clicking on the column headers.
13
Transfer Arrow. The arrow on the far left side of the item identifies what type of
transwas performed. An up arrow means upload, a down for download, and a leftright arrow is for site-to-site transfers.
Date. This is the date and time the transfer was completed.
Source. This is the site profile that was used to connect to the 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.
Executing a file
After a file is successfully transferred, you can select it and choose Execute from the
right-click menu. If it is a download, the destination file will be opened in its associated
applicaIf it is an upload, the source file will be opened.
Exit Application. After the application finishes all active or scheduled transfer
requests, WS_FTP will close itself.
Shutdown Computer. After the application finishes all active or scheduled transfer
requests, WS_FTP will attempt to shut the computer down.
14
Bulk Import
Connection Log
The Connection log shows all commands sent from WS_FTP to the server and shows
the replies from the server. This log can help you troubleshoot a connection error.
The log window will contain all actions that have been initiated for the selected transfer
request, including pause and resume.
For descriptions of error messages that may appear in the log, see Textual Error
Messages (on page 73).
15
CHAPTER 3
Scheduler Utility
In This Chapter
Using the Scheduler ................................................................ 17
Examples................................................................................. 18
The WS_FTP Pro Scheduler Utility lets you create FTP tasks or jobs for transfers that
you need to perform repeatedly or manually at a particular time. Each task can consist
of any number of uploads and downloads of files and folders.
This chapter provides an overview of the Scheduler and some examples of how you
might use it. For detailed instructions on using the Scheduler, start the Scheduler and
use its online Help.
From the Start menu, select Programs > Ipswitch WS_FTP 12 > Utilities >
WS_FTP Scheduler.
Once you are in the Scheduler window, you are ready to set up a file transfer task. You
can:
Drag and drop a file from the WS_FTP interface to the Scheduler window to create
an upload task.
The WS_FTP 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.
From the WS_FTP Scheduler dialog, click File > New > Custom. 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
4
5
In the Start Time box, enter the time of day you want the task to run.
In the Executable box, enter the full path to the ftpscript.exe application.
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 a Windows 2000 or Windows XP, you must enter your user login and
passin the boxes provided.
18
Bulk Import
If you are on a domain, include the domain name in the Username box. Example:
IPSWITCH_D\userid
7
8
Select the frequency of the recurring transfer in the Schedule Frequency area.
Click OK to add this task to the scheduler.
2
3
4
5
6
7
In WS_FTP, in the local or a remote file list, right-click the file you want to transfer,
then select Send to Scheduler from the pop-up menu.
You can select multiple files or folders by holding the Ctrl key and clicking the file or
folder name. The Schedule Item Properties dialog appears.
In the Start Date and End Date boxes, set the dates for when you want this
recurring task to begin and end.
In the Start Time box, enter the time of day you want the task run.
The Executable, Command, and Task Name boxes are filled in for you. A .tmp
file name is automatically entered in the Command box. This file identifies the files
to download and the locations to transfer them to and from.
If you are using Microsoft Windows 2000 or Microsoft Windows XP workstation,
enter your Username and Password in the boxes provided.
In the Schedule Frequency, select the recurring transfer frequency.
Click OK to add this task to the scheduler.
19
CHAPTER 4
Backing Up Files
In This Chapter
Using the Backup Job Wizard (WS_FTP Professional)........... 21
Examples................................................................................. 23
The Backup Wizard lets you select files or folders that you want to back up, schedule a
backup time, or run the backup immediately. Unlike the Synchronize utility, rather than
comparing and transferring files in multiple directions (for example, synchronizing files
between a local and remote site), Backup transfers selected files or folders from one
location to another (in one direction).
This chapter provides an overview of the Backup Wizard, Managing Backup Jobs, and
some examples of how you might use the Backup features.
Click Tools > Backup Files > Add a new backup job....
21
To use the ZIP files before backing up option, the source files must be in a local
folder. Also, to include the current date/time in the name of the destination zip file,
include the string "%date" in the file name you enter. WS_FTP will replace that string
with the current date/time in format: yyyymmdd-hhmmss.
After the settings are complete, the Manage Backup Jobs dialog opens. The new
Backup Job displays in the list. The job will run at the next scheduled time, or you
can click Run Now to run the job immediately.
If you schedule a backup job to run Daily (in Backup Wizard settings), the job will start
running on the day following the start date.
Click Tools > Backup Files > Manage backup jobs. The Manage Backup Jobs
dialog opens.
2 Click to highlight a Backup Job that you want to Change, Remove, or Run:
Run Now. Click to run the selected Backup Job immediately, without waiting for
the scheduled time.
22
Bulk Import
To add a new Backup Job, click Add and complete the new Backup Job settings.
Examples
The following are examples of how you might use the Backup Job Wizard and Manage
Backup Jobs.
Click Tools > Backup Files > Add a New Backup Job. The Backup Wizard
opens.
23
Browse to select the Files to backup location. When the Browse for Folder dialog
opens, make sure that you select the appropriate tab (Local or Remote) for the
files you want to back up. Click OK.
Browse to select the Backup files to location. Again, when the Browse for Folder
dialog opens, make sure that you select the appropriate tab (Local or Remote) for
the files you want to back up, then click OK.
4 If you want to have the backup files compressed to a .zip file, click ZIP file before
backing up.
24
Bulk Import
Select the Backup Frequency, Start Time, Perform this task options to schedule
the backup, then click Next. The Backup Login wizard page displays.
7 Enter your Windows Username, Password, and Password Confirmation for your
user account.
Important:Make sure that you enter your Username, Password, and Password
Confirmation. This provides the appropriate login information when the Backup
Wizard starts to run a scheduled backup.
25
Click Next. The Manage Backup Jobs dialog opens and the new Backup Job
displays in the list. The job will run at the next scheduled time, or you can click Run
Now to run the task immediately.
26
Bulk Import
Click Tools > Backup Files > Manage backup jobs The Manage Backup Jobs
dialog opens.
Click to highlight a Backup Job that you want to Change, Remove, or Run:
Run Now. Click to run the selected Backup Job immediately, without waiting for
the scheduled time.
To add a new Backup Job, click Add and complete the new Backup Job settings.
27
CHAPTER 5
29
Click Tools > Synchronize Files > Add a new synchronize task. The
Synchronize Wizard opens.
30
Bulk Import
Click:
Schedule to open the Schedule utility and set times to run the sync job.
Save to save the sync job control file (.ctl) to store configuration options and
setfor your synchronize jobs. This saves you from setting up a job each time you
want to run it.
31
From the Tools menu, click Synchronize Files > Manage synchronize tasks. The
Synchronize Utility opens.
- OR -
From the Start menu, select Programs > Ipswitch WS_FTP 12 > Utilities >
WS_FTP Synchronize Utility.
Synchronize Dialog
This is the main dialog of the WS_FTP Synchronize utility. When you use this dialog,
you are creating a control file (.ctl) that will be used to perform the synchronization
between the locations you identify.
Important: You cannot use OpenPGP mode when transferring files using the
Synchronize Utility. You can transfer files that have already been OpenPGP-encrypted.
Save - Click this button to save your current settings as a control file.
Execute - Click this button to execute the synchronize job. If the Visual compare
only (no action performed) option is selected, the Compare dialog shows the actions
that will occur, but no transfers are made.
Schedule - Click this button to schedule the synchronize job through WS_FTP
Scheduler.
Location1 and Location2 - 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. Locations can be either a local or a remote
site.
Customized - Lets you set the actions you want the utility to perform when files
are found with a specific status.
32
Bulk Import
Status and Actions - Use these options when you have chosen Customized
mode. The Status is the current state of the comparison, and the Action is what
WS_FTP Synchronize will do when it finds an item with that status.
Newer on Loc1 - The file found in Location 1 is newer than the file found in
Location 2.
Top level only. Select this option to have the locations synchronized on the top
level only. All subdirectories will be ignored.
Show files/folders that won't be transferred. Select this option to have Sync
disfiles with the No Action action code in the Compare dialog.
Visual compare only (no transfer). Select this option to have Sync populate the
Compare dialog without executing the synchronize job. Once you are on the
Comdialog, you can make changes to what tasks the job will perform.
Show FTP conversation in log. Select this option to show the FTP
conversation in the generated log file, as well as the log pane on the Compare
dialog.
Skip unmodified files. Select this option to have Synchronize compare files
between the sites. The content is compared using the user selected File Integrity
algorithm settings, click Help for more information. If the files are the same, no
transfer occurs. If the files are not the same, they are updated to the target
site(s).
Note:This option compares files before transferring them and therefore may reduce the
transfer speed.
If ASCII Transfer Mode, OpenPGP, Compression Mode, or Append Mode transfer
options are used, then the Skip unmodified files option is ignored.
Post Transfer Actions. See Post Transfer Actions (on page 36).
33
Example
The following is an example of how you might use the Synchronize Utility.
When you click the Execute button, the control file named untitled.ctl (the name is disin
the title bar for the dialogue) is executed according to the parameters set on the
WS_FTP Synchronize Utility screen:
According to the options selected, Location 1 is to be updated with all files found in
Location 2.
If you want to schedule this task to run on a regular basis, or at a certain time of day,
click the Schedule button. The Schedule Item Properties dialog appears. Use this
diato set the time, date, and frequency of the synchronize job. For more information
on using the WS_FTP Scheduler, see Using the Scheduler on page 13.
34
Bulk Import
Since the Visual compare only option is selected, the transfers will not be
executed, but the Compare dialog will appear comparing the two locations, and
displaying potential actions to be taken by the utility. You can change the actions to
be performed on this dialog, then click Execute to start the process.
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
35
site profile, or a local folder. Click the Local tab on the Folder Selection dialog to
choose a local folder.
Note: You cannot use OpenPGP mode with the Synchronize Utility. If you use a
OpenPGP-enabled site with Synchronize, be aware that the files will not be encrypted.
You can, however, transfer files that have already been OpenPGP encrypted.
2
3
4
The files and folders are automatically synchronized with the location defined in the
control file.
Delete Source File(s). After the file transfer is completed, delete the source file(s)
from the folder.
36
Bulk Import
Rename Source File(s). After the file transfer is completed, rename the source
file(s) in the folder.
Move Source File(s). After the file transfer is completed, move the source files to a
specified folder.
Note:To move the file, the source location must have access to the specified folder.
For example, you cannot move local files to a remote site; you can move files from a
local folder to another local folder; or from a remote folder to another folder on the
remote site.
Rename and Move Source File(s). After the transfer has completed, renames the
source file(s) using the Rename Mask (described above), then moves the files to the
specified directory on the source machine.
37
To add an exclusion:
1
2
In the Exclusions section of the dialog, click Add. The Exclusion dialog appears.
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.
Click here for examples of exclusion rules.
In the Type box, select what type of item you want to apply the exclusion to.
Apply to both. Select to apply the exclusion to both files and folders.
Exclusion Examples
Here are a few examples of exclusions, followed by an explanation of each.
Absolute file exclusions
Exclusion rule: /mydir/*.exe
Type: Absolute location
This will exclude all .exe files in the mydir remote directory, but the path is taken from
the root of the remote system.
Exclusion rule: c:\mydir\*.exe
Type: Absolute location
This will exclude all .exe files in the c:\mydir local directory.
Exclusion rule: /mydir/nextdir/myfil?.*
Type: Absolute location
This will exclude any file beginning with myfil with one arbitrary character and any
extenin the directory /mydir/nextdir.
38
Bulk Import
39
To add an inclusion:
1
2
In the Inclusions section of the dialog, click Add. The Inclusion dialog appears.
Enter what you want to include in the Rules box. If you use the Absolute location
type, click Browse to select the file or folder.
Click for examples of inclusion rules.
In the Type box, select what type of item you want to apply the inclusion to:
Apply to both. Select to apply the inclusion to both files and folders.
Inclusion Examples
Here are a few examples of inclusions, followed by an explanation of each.
Absolute file inclusions
Inclusion rule: /mydir/*.exe
Type: Absolute location
This will include all .exe files in the mydir remote directory, but the path is taken from the
root of the remote system.
Inclusion rule:c:\mydir\*.exe
Type: Absolute location
This will include all .exe files in the c:\mydir local directory.
Inclusion rule: /mydir/nextdir/myfil?.*
Type: Absolute location
This will include any file beginning with myfil with one arbitrary character and any
extenin the directory /mydir/nextdir.
Bulk Import
41
42
CHAPTER 6
Script Utility
In This Chapter
Starting the Script Utility (WS_FTP Professional) ................... 44
Writing and Debugging Scripts ................................................ 44
Executing Scripts..................................................................... 45
Running a Script from the Script Utility.................................... 45
Example................................................................................... 45
The WS_FTP Script Utility lets you group any number of file transfer tasks into a script
that can be executed with one action. This can be especially useful for file transfers that
you do repeatedly.
This chapter provides an overview of the Script Utility and some examples of how you
might use it. For detailed instructions on using the Script Utility, start the Script Utility
and use its online Help.
Using scripts, you can:
After the transfer has completed: delete, rename, move source files
Scripts can also have some limited flow control. They can:
Suppose you post weekly reports on your company's server for your co-workers in other
cities to download. Let's assume you place the current week's reports in a folder named
Current. You could create a script that:
You can also create scripts for downloads that you do repeatedly.
43
Select Start > Programs > Ipswitch WS_FTP 12 > Utilities > WS_FTP Script
Utility.
For a complete list of scripting commands, see Script Command Reference in the
online help.
44
Bulk Import
Executing Scripts
You can execute scripts from either the Command Prompt or from the Script Utility
itself.
Example
In the following example, the script executes the following sequence of commands:
1
2
3
4
5
6
7
8
9
10
11
12
45
46
CHAPTER 7
File content. Use the Google Desktop or Copernic Desktop Search to search
for content within files on your computer.
File name. Use the Windows Desktop Search to search for files by file name on
your computer.
This chapter provides an overview of the local and remote search utilities and some
examples of how you can use them. For more information, see the online Help.
47
From the Tools menu, click Search > Local File. The Search tab opens in the
local connection window.
48
Bulk Import
In the Search box, enter the file name or part of the file name you want to find. You
can use wild card characters such as * and ?.
For additional search options, click Options. The Search Options dialog box
opens. Click Help for more information about the Search Options dialog.
4
5
Click OK. The search results are displayed in the search results list.
Select the file that you want to upload from the search results. Upload the files to
the FTP server you select. For more information about search result transfer
options, see the following section Using the Local Search Results (on page 51).
Only a single file at a time can be selected and transferred from the search results.
You can also search for content within files on your computer with the Google
Desktop Search or Copernic Desktop Search options.
Copernic or Google Desktop Search utility must be installed to search for file content
using their integrated search engine from the Ipswitch WS_FTP client. If the desktop
search utility is installed on your computer, it will appear in the Program Options >
General > Desktop Search Technology list.
49
If the Google Desktop Search or the Copernic Desktop Search utility is installed on
your computer, it appears in the Desktop Search Technology list.
From the Tools menu, click Search > Local File. The Search tab opens in the
local connection window.
In the Search box, enter the file content search criteria for the text you want to find.
The Google Desktop Search or the Copernic Desktop Search parameters are
determined by each search utility. Refer to the Help information to learn about using
each utility's unique search parameter requirements.
The search Options button is disabled when the Google Desktop Search or the
Copernic Desktop Search utility is installed and enabled. If the desktop search utility
is installed on your computer, it appears in the Tools > Options > General > Desktop
Search Technology list.
Click OK. The search results are displayed in the search results list below.
50
Bulk Import
Select the file that you want to upload from the search results. Upload the files to
the FTP server you select. For more information about search result transfer
options, see the following section Using the Local Search Results (on page 51).
Only a single file at a time can be selected and transferred from the search results.
Send to [favorites site name] (HotDrop file) to transfer the file to the HotDrop's
associated remote site.
WS_FTP Transfer > Compress and Transfer as [filename.zip] to transfer the file
to the active remote site.
WS_FTP Transfer > Encrypt and Transfer to use an encryption key to encrypt a
file before transfer.
WS_FTP Transfer > Sign and Transfer to add your digital signature to a file. By
adding your digital signature, you provide a higher degree of confidence in the file
integrity for those downloading your files.
WS_FTP Transfer > Encrypt, Sign and Transfer to first encrypt a file, then to add
your digital signature.
Send to Scheduler to open the Schedule Properties dialog and schedule a file
transfer.
To transfer a file
1
In the search results dialog box, select the file you want to transfer, then select one
of the short cut (right-click) menu options described above.
2 Select the site or folder to upload the file to.
From the Tools menu, click Search > Remote File. The WS_FTP Find Utility
dialog opens.
- OR -
51
From the Start menu, select Programs > Ipswitch WS_FTP 12 >
Utilities > WS_FTP Find Utility.
Use the Look in list box to select a site previously searched or click the Browse
button to specify the site to which you will connect and search. You can also type in
a host name or FTP URL.
3 Enter your search criteria. You can search by name, date modified, size, or any
combination of the three.
4 Click Find Now. The Find Utility connects to the FTP site and searches according
to your criteria.
For example, if you search the Ipswitch FTP site for a file named wsftp80.pdf, the
following results are displayed.
52
Bulk Import
Transfer it.
Schedule it for transfer at a later time, by selecting Send to Scheduler from the
right-mouse menu.
To transfer a file
1
In the dialog box above, select the file you want to transfer, and select Transfer
from the right-mouse menu. A browse window appears.
2 Select the folder to which you want to download the file.
Examples
The following are examples of different types of searches.
53
54
Bulk Import
55
2
3
4
Bulk Import
In the Size is box, you can select At least or At Most, then enter the file size in
kilobytes in the KB box.
57
CHAPTER 8
Use post transfer actions to delete, rename, or move source files after the transfer
has completed
Note:Though some command lines in this chapter may wrap across multiple lines, all
command lines should be entered on one line.
59
For example, 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.
Note:So you can use the command line from any location on your hard disk, we
recommend that you place the WS_FTP folder in the Path statement in your
Autoexec.bat file, if you are running Windows 2000, Windows 2003, or Windows XP.
Otherwise, change to your WS_FTP 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 uses the User ID,
Password, and Account Name you saved in the site configuration. To use a configsite,
enter the site name in front of the remote directory (which can be either the source or
the destination). If the configured site is stored in a folder, you must also enter the folder
name. Separate the folder name from the site name by using the ! symbol
(sitefolder!site). In the example above, we use the border site configuration 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 can enter it in the
command line by using the -w argument.
For example:
wsftppro -u username -w password -s robert!border:/pub/tartan.bmp -d
local:c:\armstrong\
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.
60
Bulk Import
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
remote 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
The transfer destination argument begins with the -d argument, followed by the label for
the destination, and the path to where files are being transferred to. If the destination is
your local system, the destination label is local. If you are doing an upload, the
destination label is either the site folder!site name (as in the example above) or the IP
address, FTP URL, or Host name of the FTP site. For example:
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
61
wsftppro -s local:c:\armstrong\tartan.bmp -d
robert!border:/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 locaHowever, 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, you are connecting to the remote system using the border site
profile and downloading the tartan.bmp file to the armstrong folder on your 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
62
Bulk Import
Compressing Files
To compress a file to a .zip file during the upload, enter the -compress argument, type:
wsftppro -compress -s local:c:\sports\Tag.doc -d
robert!border:/pub/drop/Tag.doc
-delete
After the file transfer is completed, delete the source file(s) from the folder.
-move [directory]
63
After the transfer has completed, moves the source file(s) to the specified directory
on the source machine.
64
Bulk Import
[OnlyName] - The original file name minus the extension and the period (between
name and extension). To retain the original file name, you must use this macro.
[OnlyExt] - The original file name extension. To retain the original file name
extension, you must use this macro.
If you want to retain the original file name and extension, you would enter
[OnlyName].[OnlyExt]. Whether or not you retain the original name or extension, you
need to include the period between the file name and extension.
For example, if you want to upload a file named inventory.pgp, then rename the file in
the destination directory with the upload date and time, you could use macros to create
the following File Rename Mask:
[mm][dd][yy][hh][OnlyName].[OnlyExt]
which, if transferred on January 15, 2009 at 7:00 AM, would rename the file to:
01150907inventory.pgp
You do have to enter the period that separates the file name from the extension.
Instead of typing the command at the command 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 command prompt, double-clicking
the icon for the .bat file from within Windows, or running the .bat file from another
application (such as WS_FTP Scheduler).
Here is a batch file (for the example at the beginning of this chapter) as viewed from a
Windows text editor:
66
Bulk Import
When you run the batch file named tartan.bat, WS_FTP 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 application (and connects to the remote 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 67).
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
If a file or folder name has a space in it, you must enclose that entire argument in
quotes.
67
When you use the command line to perform a pre-scheduled transfer, you may use the
-quiet parameter to prevent WS_FTP from displaying a message box if an error occurs.
This is particularly useful for avoiding a situation in which WS_FTP might otherwise
prompt for user input, such as clicking the OK button in an error message. This way,
you can pre-schedule transfers to run automatically when you're not at your computer.
(When you return to the computer, you can always check the log file to see if there were
any problems.)
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 display a dialog box that prompts you for the command line, type:
wsftppro -ask
To launch the WS_FTP interface and default to the border site inside a folder named
robert: wsftppro -p robert!border
To prevent WS_FTP 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
68
Bulk Import
Summary of Arguments
Here is a list of all arguments you can use in the command line.
Arguments (alphabetical)
When to use
Important restrictions
-ascii
-binary
-c account
-compress
-d path_and_filename
-%date
-delete
-lower
-m text_file
69
-quiet
-s path_and_filename
-u userID
-w password
Return Codes
Messages returned in response to a wsftppro command can include the following
codes:
Return Code
Description
Success
70
Bulk Import
3
No source filename
10
11
12
13
Transfer failed
14
15
16
Failed to initialize
71
APPENDIX A
Disconnect from the FTP site if you are currently connected to it. Then turn on
passive mode. To do this:
In the Site Options, select Advanced, then enter 120 or higher for the Network
Timeout.
3 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. After you know how long it takes to connect, enter this time into the Network
Timeout setting on the Advanced dialog of the site options as described above.
4 If you still cannot connect please contact the FTP server administrator for
assistance.
73
"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 file time on upload (MDTM support
required) on Site Properties > Session.
Bulk Import
you are unsure whether or not you are using the correct user name and password,
contact the FTP
site administrator.
Most FTP sites support anonymous logins where you do not have to have an actual
account on the FTP site in order to download files; the user ID is the word Anonymous
and the passis your e-mail address. To test this, try connecting to the Ipswitch FTP site
(ftp.ipswitch.com) using the user ID Anonymous.
If you do have to have an actual account on the FTP server, for example, a server
where you place your web pages, then you will need to obtain a user ID and password
from the server administrator and enter them in the host information tab.
75
Index
5
530 user access denied ........................... 74
A
autoexec.bat............................................. 59
automating file transfers ........................... 67
B
Backup Wizard ......................................... 21
adding jobs.......................................... 23
managing jobs..................................... 26
batch files ................................................. 66
C
command line
suppresssing messages...................... 68
transferring file name with spaces ...... 66
command prompt ..................................... 45
Compression Mode .................................... 7
Copernic, desktop search ........................ 47
D
dates and times, using to find files and
folders ................................................... 55
desktop search
options................................................. 47
using.................................................... 47
E
error messages .................................. 68, 73
F
file name, using to find files...................... 54
file names with spaces, transferring......... 66
file size, using to find files ........................ 57
Find Utility................................................. 47
G
Google, desktop search ........................... 47
L
Logon failure. Quitting. ............................. 74
MDTM error...............................................74
messages
error......................................................73
suppressing with the command line.....68
Microsoft Internet Explorer..........................8
mirroring files and folders..........................29
Month-Day-Time-Marking .........................74
N
name of file, using to find files...................54
Netscape Navigator.....................................8
P
pre-scheduled transfers ............................67
Q
queuing transfer tasks...............................67
R
Request Properties ...................................13
S
Scheduler Utility ........................................17
scheduling
backup jobs..........................................21
transfer tasks .......................................17
transfers ...............................................67
transfers ...............................................19
Scripting Utility ..........................................43
scripts
example ...............................................45
writing and debugging..........................44
search .......................................................47
by filename...........................................47
for file content ......................................47
local files ..............................................47
options..................................................47
remote files ..........................................51
using Copernic search .........................47
using Google search ............................47
using local results ................................51
using remote results.............................53
using Windows search .........................47
utilities ..................................................47
Search Utility .............................................47
size of file, using to find files .....................57
spaces in file names
transferring with command line............66
spaces in file names, transferring with
command line ........................................66
77
T
Transfer Manager..................................... 11
Transfer Manager Log Window................ 15
transferring
local search results ............................. 51
remote search results.......................... 53
transferring files
scheduling ........................................... 67
using command line to transfer file
names w......................................... 66
U
User access denied.................................. 74
78