How to Synchronize Folders
Previous  Top  Next

Synchronizing folders is a very useful feature when updating web site contents or making a backup copy of the web site. The folder synchronization feature allows the user to duplicate local folder contents to the remote server, automatically uploading only new and changed files. It also makes it very easy to duplicate remote server contents to a local hard disk by downloading only new and modified files. In either case, the user does not need to know or remember what files were modified and need to be transferred.

To synchronize folders:

1.Connect to the remote server and navigate to the desired remote folder  
2.Navigate to the desired local folder  
3.Select the Synchronize Folders command from the Commands menu or press the F3 hotkey  

The Synchronize window opens and you can configure the sync options. This window displays a preview of files that will be transferred. Notice that this list includes only files in current folders, as Synchronize also transfers files in subfolders if the Include Subfolders check box is selected.

Synchronize Direction

Synchronize Local > Remote. Uploads all new and changed files in the local folder to make the remote folder contents similar to the local one. This option is useful when you maintain a copy of your web site on your local hard disk. You can add html files and pictures and update web pages locally. When the site is ready to be published, you synchronize the local folder to the remote server. This way, all new and changed files are uploaded automatically, and you don't need to remember what files need to be uploaded.

Synchronize Remote > Local. Downloads all new and changed files in the remote folder to make the local folder contents similar to the remote one. This option is useful when you make regular backups of your web site. Just connect to the web server and sync the remote folder to the local one. The program automatically downloads all new and changed files and keeps the backup copy always updated.

Synchronize Local <> Remote. This options makes both folders identical. It:

·Uploads all files that do not exist in the remote  
·Upload all files that are newer in the local folder than in the remote folder  
·Downloads all files that do not exist in the local folder  
·Downloads all files that are newer in the remote folder than in the local folder  


Synchronize Options

Include Subfolders
Synchronize also syncs subfolders under the current folder

Ignore Case
Consider filenames FILENAME.EXT and filename.ext as the same

Compare File Size
When turned on, compares file size if the file exists in the local and remote folders. And transfers the file if its size is different.

Compare File Date
When turned on, compares the file date if the file exists in the local and remote folders. If sync direction is Local > Remote or Remote > Local, transfers the file if the file date is different. If sync direction is Local <> Remote, transfers the file that is newer.

NOTICE! This option is somewhat problematic due to limitations in FTP specifications. The problem lies in the fact that when uploading files, the file dates are always reset to the current server time and date. This means that if you have a local file that was last modified 30/12/2008 12:45, and you upload it on 31/12/2008 11:00, the file gets the upload date on the server (31/12/2008 11:00). So even though the files are the same, they now have different date stamps on the local and remote folders. So when viewed at a later time, there is no way for you to know if the files are the same, as the file size is same, but the file date is different.

This problem does not occur when doing Remote > Local sync, because after downloading, 3D-FTP sets the local file time and date to the same value as it is on the server. Unfortunately there is no way in the FTP standard to allow 3D-FTP to set the remote file date to same value as the local time and date after uploading.

Due to these file date-related problems, it many times makes sense to leave the Compare File Date option unselected.

Delete Extra Files and Folders
After transferring all new and changed files, you can let 3D-FTP delete all files on the destination site that do not exist in the source folder. For example, Local > Remote sync mode deletes all files in the remote folder that do not exist in the local folder. By allowing deletions, local and remote folders are identical after synchronization.

Confirm Deletes
Shows a confirmation dialog before actually deleting any files. This setting only applies when the Delete Extra Files and Dirs option is also selected.


Sync Filtering


Filter Inactive...

You can enable filtering for the sync session by pressing the Filter Inactive button. The filters you specify are automatically saved for later sessions, so if you turn filtering ON, it is NOT automatically turned off when you exit 3D-FTP, but the same setting is restored at the next program start up. You must manually turn filtering off to disable it.

The Sync Filter options are:

·Include Filter: If used, only file and folder names that match the filter criteria are included in the sync operation. All files that do not match filter criteria are excluded.  
·Exclude Filter: If used, file and folder names that match filter criteria are excluded from the sync operation.  
 
Examples. You specify following filters:


Include Files: *.html;*.htm;*.gif
All HTML files and picture files with the "gif" extension are included in the sync
Include Files: *
All files are included in the sync
Include Files: sys*.*
All file names starting with "sys" and having some extension are included.
NOTICE! Files without an extension are NOT included. (see below)
Include Files: sys*
All file names starting with "sys" are included in the sync, with or without extension.
Include Dirs: pub;public
When the Include subdurectories option is in use, files in the current folder and files in the "pub" and "public" folders are included in the sync. Notice! Only "pub" and "public" subfolders under these are included.
Exclude Files: *.log
Exclude filenames with "log" extension from the sync.
Exclude Files: *.tmp;*.temp;_*
Exclude filenames with "tmp" and "temp" extensions, and filenames prefixed with underscore character from the sync.
Exclude Dirs: bin;usr;etc
Exclude "bin", "usr" and "etc" folders from the sync.


You can specify multiple filters simultaneously by separating them with semicolons.

NOTICE! The filter *.* applies ONLY to filenames that have an extension. You must specify * to apply the filter to all filenames.

Disabling Filtering

1.Click the Filter Active... button  
2.Click the Reset button to disable all filtering.