Copyright: Copyright \251 1998 Ipswitch, Inc.


Index
WS_FTP Synchronize Utility for Windows 95/NT (x86 version)

Ipswitch, Inc.

http://www.ipswitch.com

Program Information

Description

Installation

Year 2000 Compliance

For More Information

Command Line Arguments

Control Files

Additional Notes

Screens

Introduction Screen

Main Screen

Status Screen

Creating New Control Files

Site Name

Local Folder

Remote Folder

Synchronize Direction

Options

Summary

How to

Start the WS_FTP Synchronize Utility

Create a control file

Update the remote folder with files in the local folder

 	Update the local folder with files in the remote folder

Make the local and remote folders match


Overview

The WS_FTP Synchronize Utility works  with any installation of WS_FTP Pro Version 6.0 or later and provides the ability to synchronize (or mirror) a local directory structure with a directory structure on a remote system.

WS_FTP Synchronize provides the following capability:

•	Make the remote (on an FTP server) directory structure match the local (on your system) directory structure.

•	Make the local (on your system) directory structure match the remote (on an FTP server) directory structure.

•	Make each match the other by copying the newest version of local files to the remote system and by copying the newest of version of remote files to the local system.

In addition, WS_FTP Synchronize provides options that help you maintain synchronization between the sites. You can set options to do the following:

•	Delete files and directories on the target system if they are not on the source system.

•	Update only those files that already exist on the target system.

•	Force an update by updating files regardless of date, time or size.


Installation

When you install WS_FTP Pro Version 6.0, select the "Bonus Pack Utilities" option.

Optionally:

1	Copy "ftpsync.exe" and "syncdll.dll" to the directory where WS_FTP Pro Version 6.0 or later is installed.

2	Create an icon for "ftpsync.exe" if desired.


Year 2000 Compliance

Every attempt has been made to insure that WS_FTP Synchronize is Year 2000 (Y2K) compliant.  However, there are still a number of FTP servers that are not Y2K compliant so testing with a specific FTP server is the responsibility of user.


More Information
For More Information

  Go to http://www.ipswitch.com


Starting WS_FTP Synchronize

To start the WS_FTP Synchronize Utility:

1	From the Start menu, select Programs->WS_FTP Pro->WS_FTP Synchronize Utility.

A warning is displayed to alert you that when you synchronize the directory structure of a local and a remote folder, files in a directory (or folder) may be overwritten. We recommend that you run a new control file in test mode and view the log to verify that it does what you want it to do.

2	Click OK. The main window appears.

Related Topics

Creating a Control File


Updating Local Folder with Files in a Remote Folder

To update the files and folders in a local folder (on your PC) with the files and folders in a remote folder (on an FTP server):

1	Start the WS_FTP Synchronize Utility. The main screen appears. You will create a new control file for the synchronize task that you want to accomplish.

2	On the main screen, in the Control file name box, enter a name for the file. The file name does not require an extension.

3	In the Site name box, select an existing WS_FTP site from the drop-down list or enter the address of the site. If you select an existing site, the User ID (and password, if saved) are automatically displayed. If you are entering an IP address or name of an FTP host that does not exist in the ws_ftp.ini file, you need to enter the User ID and Password.

4	In the Local Folder box, enter the desired local folder (or click the browse button ( ... )and select the local folder).

5	In the Remote Folder box, enter the desired remote folder (or click the browse button ( ... )and select the remote folder).

6	In the Synchronize Direction options, select Local · Remote.

7	Select any of the Options. The default setting has no options selected, which means that all files and folders in the remote folder will be downloaded to the local folder. If a file appears in both folders, the file is downloaded only if it is a more recent file (by comparing the timestamps). Note that this makes it important that you specify any time zone difference between the local and remote hosts.

8	In the Time difference box, specify any time zone difference between the local and remote hosts. Except when Force update of destination is selected, it is important to set the time offset properly. Normally, if the FTP server reports dates and times in Greenwich Mean Time (GMT), this time offset will be the time zone difference for the local system from GMT. Otherwise, you must determine the time difference using a utility like WS_FTP Pro classic. (For example, -4 works for systems in the Eastern US time zone (with daylight savings time in effect). Note that this option is ignored if the remote system is a WS_FTP Server as it will always communicate using GMT.

9	Before running the actual update (synchronization), first test your control file by selecting the Test script only option, and then clicking Go.

The Status window shows the results of the test.

10	  If satisfied with the test, clear the Test script only option, and then click Go.

WS_FTP Synchronize compares the files in the two folders and updates the local folder according to the specified options.


Updating Remote Folder with Files in Local Folder

To update the files and folders in a remote folder (on an FTP server) with the files and folders in a local folder (on your PC):

1	Start the WS_FTP Synchronize Utility. The main screen appears. You will create a new control file for the synchronize task that you want to accomplish.

2	On the main screen, in the Control file name box, enter a name for the file. The file name does not require an extension.

3	In the Site name box, select an existing WS_FTP site from the drop-down list or enter the address of the site. If you select an existing site, the User ID (and password, if saved) are automatically displayed. If you are entering an IP address or name of an FTP host that does not exist in the ws_ftp.ini file, you need to enter the User ID and Password.

4	In the Local Folder box, enter the desired local folder (or click the browse button ( ... )and select the local folder).

5	In the Remote Folder box, enter the desired remote folder (or click the browse button ( ... )and select the remote folder).

6	In the Synchronize Direction options, select Local · Remote.

7	Select any of the Options. The default setting has no options selected, which means that all files and folders in the local folder will be uploaded to the local folder. If a file appears in both folders, the file is uploaded only if it is a more recent file (by comparing the timestamps). Note that this makes it important that you specify any time zone difference between the local and remote hosts.

8	In the Time difference box, specify any time zone difference between the local and remote hosts. Except when Force update of destination is selected, it is important to set the time offset properly. Normally, if the FTP server reports dates and times in Greenwich Mean Time (GMT), this time offset will be the time zone difference for the local system from GMT. Otherwise, you must determine the time difference using a utility like WS_FTP Pro classic. (For example, -4 works for systems in the Eastern US time zone (with daylight savings time in effect). Note that this option is ignored if the remote system is a WS_FTP Server as it will always communicate using GMT.

9	Before running the actual update (synchronization), first test your control file by selecting the Test script only option, and then clicking Go.

The Status window shows the results of the test.

10	  If satisfied with the test, clear the Test script only option, and then click Go.

WS_FTP Synchronize compares the files in the two folders and updates the remote folder according to the specified options.


Making the Local and Remote Folders Match

To make the files and folders in a remote folder (on an FTP server) match exactly the files and folders in a local folder (on your PC).

1	Start the WS_FTP Synchronize Utility. The main screen appears. You will create a new control file for the synchronize task that you want to accomplish.

2	On the main screen, in the Control file name box, enter a name for the file. The file name does not require an extension.

3	In the Site name box, select an existing WS_FTP site from the drop-down list or enter the address of the site. If you select an existing site, the User ID (and password, if saved) are automatically displayed. If you are entering an IP address or name of an FTP host that does not exist in the ws_ftp.ini file, you need to enter the User ID and Password.

4	In the Local Folder box, enter the desired local folder (or click the browse button ( ... )and select the local folder).

5	In the Remote Folder box, enter the desired remote folder (or click the browse button ( ... )and select the remote folder).

6	In the Synchronize Direction options, select Local < · Remote.

7	Select any of the Options. The default setting has no options selected.

8	In the Time difference box, specify any time zone difference between the local and remote hosts. Except when Force update of destination is selected, it is important to set the time offset properly. Normally, if the FTP server reports dates and times in Greenwich Mean Time (GMT), this time offset will be the time zone difference for the local system from GMT. Otherwise, you must determine the time difference using a utility like WS_FTP Pro classic. (For example, -4 works for systems in the Eastern US time zone (with daylight savings time in effect). Note that this option is ignored if the remote system is a WS_FTP Server as it will always communicate using GMT.

9	Before running the actual update (synchronization), first test your control file by selecting the Test script only option, and then clicking Go.

The Status window shows the results of the test.

10	  If satisfied with the test, clear the Test script only option, and then click Go.

WS_FTP Synchronize compares the files in the two folders and copies the newest version of files in the local folder to the remote folder, and copies the newest version of files in the remote folder to the local folder.


Command Line Arguments

WS_FTP Synchronize can be called directly from the command line by passing the name of one or more control files .  To separate multiple control files, use commas.

ftpsync updateftp1.ctl, updateftp2.ctl, updateftp3.ctl

When you run this command, output is logged to a file with the name of the control file plus an extension of ".log".

Output from command runs also goes to stdout, so you can redirect output to a file of your choice or to a program of your choice. Note that "ftpsync.exe" normally runs in the background with no output unless stdout has been redirected. If you must wait for "ftpsync.exe" to complete processing before the next command should execute, you must redirect output.


Control Files

Control files should be created with the internal wizard (available by running ftpsync with no command line args) and contain the following lines types: (all line types are identified by a single character at the beginning of the line)

V	version (currently only V1 is supported)

F	flags (add these together to get value)

1	Allow deletion of files/dirs

2	Only update existing files

4	Don't recurse (one level)

16	Force update

T	type of action

0	local to remote

1	remote to local

2	by directional

Z	hours difference between local and remote

S	WS_FTP Site (must come from ./ws_ftp.ini) or an IP address/host name

L	full local (on local system) directory path

R	full remote (on ftp server) directory path

U	userid for IP address/host name (only present if you are not using a WS_FTP Site)

P	password (plain text), [note that ftpsync will NEVER write this into a control file] (you must manually add this if you want to run the script unattended and the password is not saved in the WS_FTP.INI file)

Sample:

V1

F1

Z4

T1

Swks005-junodj

LC:\test\newtest

R/users/junodj/newtest


Additional Notes

The word “folder” is used in place of the word “directory” within this help file and the program. Many users of host systems may not find any reference to the term “folder” when referring to host system documentation. Folder and directory should be considered synonym.

Except when Force update of destination is selected, it is important that the time offset be set properly. Normally this time offset will be the time zone difference for the local system from GMT, if the FTP server reports dates and times in GMT. Otherwise, you must determine the time difference using a utility like WS_FTP Pro classic. (For example, use -4 systems located in the Eastern US time zone (with daylight savings time in effect.)


Introduction Screen

The WS_FTP Synchronize Utility lets you synchronize (or mirror) directory structures between your system and a remote FTP server with minimal intervention. This means it can easily erase or overwrite large number of files without prompting you.

To verify that this program will do what you want, please run any new control files in “test mode” before running it for real. You can then peruse the contents of the status window to verify that it will do what you expect.

You should look for lines like:

# deleting filea.ext

# sending fileb.ext 19960217/00:00 (19950217/00:00)

# receiving filec.ext 19960217/00:00 (19950217/00:00)

(See Status Screen for a full explanation of these lines.)


Main Screen

The main program screen displays the current control file settings. You can change any of these settings and save the changes to the file.  After you have selected the settings, click Go to start the program.

Control File Name

Site Name

Local Folder

Remote Folder

Synchronize Direction

Options


Control File Name

Enter the desired name for the control file (or press the browse button [...] to select an existing control file).  Entering the name of an existing control file will automatically set all the options to match the contents of the control file.

If you desire to save the control file as a different name, you can use the File->SaveAs menu option or you can change the control file name and press [SAVE].

Pressing the [SAVE] button will save the settings to the control file specified in the Control File Name or will prompt you for a file name if the field is blank.

For more information on control files, see Control Files.


Status Screen

Shows a summary of what is happening with the program and allows you to Cancel the action. The Cancel button changes to Close when complete.

connected to 1.1.1.1

remote directory is /users/test01

local directory C:\test

Retrieving remote directory information

Synchronizing local->remote

remote directory is /users/test01/test1

# same readme.txt 19980112/01:10 (19980112/01:10)

# sending fileb.ext 19980224/11:03 (19971227/01:15)

completed

# receiving filec.ext 19980217/00:00 (19970217/00:00)


Creating New Control Files

From the File menu, select New or click the New button. A program wizard walks you through creating a new control file.

Site Name

Local Folder

Remote Folder

Synchronize Direction

Options

Summary


New Site Name
Site Name

Select an existing WS_FTP site from the drop down list or enter the address of the site. If you select an existing site, the User ID (and password, if saved) are automatically displayed. If you are entering an IP address or name of an FTP host that does not exist in the ws_ftp.ini file, you need to enter the User ID and Password.


New Local Folder
Local Folder

Enter the desired local folder (or click the browse button [...] and select the local folder).


New Remote Folder
Remote Folder

Enter the desired remote folder (or click the browse button [...] and select the remote folder).


New Sync Direction
Synchronize Direction

Select the desired synchronize direction.

Local -> Remote

Make the remote (on an FTP server) directory structure match the local (on your system) directory structure.

Local <- Remote

Make the local (on your system) directory structure match the remote (on an FTP server) directory structure.

Local <-> Remote

Make each match the other by copying the newest version of local files to the remote system and by copying the newest of version of remote files to the local system.


New Options
Options

Select the desired options:

Delete files/folders not in source

Delete files and folders on the target system if they are not on the source system.

Only update existing files/folders

Only update files that already exist on the target system ignoring any files/folders that exist on the source system that do not exist on the remote system

Force update of destination

Forces an update by updating files regardless of date, time or size making the target system match the source system. This is useful on the first update.

Time difference

In all modes except forcing an update, it is important that the time offset be set properly. Normally this time offset will be time zone difference for the local system from GMT if the FTP server reports dates and times in GMT. Otherwise, you must determine the time difference using a utility like WS_FTP Pro classic. (I'm using -4 for most systems since I am located in the Eastern US time zone and we have daylight savings time in affect.) Note that this option is ignored if the remote system is a WS_FTP Server as it will always communicate using GMT.


New Summary
Summary

Review the settings and press [FINISH] to complete or press [BACK] to go back and change some of the settings.


About
About Box

Displays the version number, copyright messages and maker of the program.


Control file

A control file contains the FTP site information (hostname, IP address, User ID, and password) needed to connect to the FTP site that contains the remote folder. The control file also contains the synchronize settings that you want to use, such as the name of the local and remote folders to be synchronized, direction in which synchronization occurs, time difference between local and remote systems, and any options.

You can create and save control files for updates that you will do on a regular basis. Entering the name of an existing control file automatically sets all the options to match the contents of the control file.