FTP Copy Files Dialog

The FTP Copy Files dialog is available from the Commands menu (main window). This dialog allows you to copy all files (listed in the FAR file list in the main window) to a location on an FTP server. The advantage over many other FTP Client program is that you simply drag and drop the days updates onto FAR and start FTP Copy. It also works in unattended FAR Batch mode.

Procedure
  1. Add the files you want to copy to the FAR file list (main window).
    The easiest way to do this is to perform a File Search (for *.*) using Windows Explorer, then sort the search result list by "Date Modified" to group your latest changes. Next drag and drop the required files onto the FAR main window (making sure the drop filter is set appropriately).
  2. Open the FTP Copy Files dialog.
  3. Select or setup an FTP Profile (press Edit or Add).
    Make sure you specify Server and Local Directory for your Profile. These define the relationship between folders on the Server and folders on the local PC.
  4. Click Start Upload to begin copying files to the server.
FTP Profile

An FTP Profile defines setting for connecting to an FTP server. A profile also specifies the relationship between folders on the server and folders on the local PC. Hence FAR knows where to copy files to.

Profile Dropdown - Select a profile for FTP Copy to use. The dropdown list contains all previously saved profiles.

Remote Host/Server Directory/Local Directory - These read-only fields display some key settings from the selected FTP Profile.

Edit Button - Edit the selected profile. Opens the FTP Profile dialog.

Add Button - Create a new profile based on the current profile settings. Opens the FTP Profile dialog.

Remove Button - Remove the selected profile and all its settings from FAR storage.

Where Files are Copied to

The Profile's Server Directory and Local Directory define the relationship between local and remote folders.

Example:

Profile: Server Directory = /public_html/
Profile: Local Directory =  c:\Inetpub\wwwroot\JamWeb

To update the server with all folders and files under local folder c:\Inetpub\wwwroot\JamWeb we could simply drop that folder onto FAR and run FTP Copy. Actually we could drop onto FAR any files/folder from under c:\Inetpub\wwwroot\JamWeb and FAR will upload them to the correct corresponding location on the server.

- files in c:\Inetpub\wwwroot\JamWeb to /public_html/
- files in c:\Inetpub\wwwroot\JamWeb\images to /public_html/images/
- files in c:\Inetpub\wwwroot\JamWeb\pub\new to /public_html/pub/new/

If you dropped files onto FAR from say c:\another\folder then FTP Copy would report a setup error, since c:\another\folder is not contained under the specified c:\Inetpub\wwwroot\JamWeb local directory. To copy from this other location you must either copy the c:\another\folder items under c:\Inetpub\wwwroot\JamWeb or create a new Profile with an appropriate Local Directory.

FTP Options

Transfer Mode: Auto, Binary, ASCII

In Auto mode files are automatically uploaded to the server in either ASCII or Binary mode according to the file type. To set the file Auto-Transfer Mode go to the FTP page of the Preferences dialog.

Select Binary to force all uploads as Binary. Likewise select ASCII to force all uploads ASCII.

Prompt before creating new server directories

When checked FAR will prompt you before a new server directory is created. This settings is ignored when run in Batch Mode (see below).

Range

Specify whether to copy All Files or just the Selected files from the FAR file list (main window). The Selected radio button is disabled if no files are selected in the main window.

Start Upload

Click this button to start copying files to the server. The upload window displays a log of all server activity. It is possible to save the content of this log by using the right-click menu. The menu also allows you to hide/show Trace items. Showing Trace items allows you to see everything sent to and received from the FTP server.

Note: You may notice the main file list sorts itself before upload begins. FAR sorts the list into original drop order (sorted by Folder) to make the upload as efficient as possible.

Note: Slow connections & connection drop outs can cause the dialog to appear locked up at times. If this happens just wait and the command should eventually time out and return you control. The Profile window has a default Timeout value which you can adjust.


Additional
Creating a Report

After uploading the files to the server you will notice the Matches column (FAR file list, main window) displays a 1 against filenames successfully uploaded, and a 0 against files that failed to copy. You can then sort the Matches column and create a report using the "File > Report" command.

Tip: If some files failed to upload and FTP Copy stopped, there's no need to copy all files again. Sort the Matches column and remove the successful uploaded items from the list. Then upload the remaining items, or save the list and upload at a later time.

Match Result Description
(Blank) Means file not processed. EG. Maybe you aborted or copied only selected files.
0 Copy failed. Possibly because the file was unavailable, or operator abruptly terminate FTP copy.
1 File successfully uploaded to server.
FTP Copy in Batch Mode

FAR can perform FTP Copy in batch mode. This is done by running FAR.EXE with special command-line switches. FAR Batch Mode could be run from Windows Scheduler or as part of an overnight build.

For more information please see FAR Batch Mode > FTP Copy Command.

Windows 95

FTP Copy requires Winsock 2 (available on W98 and later). Stock standard 95 only has Winsock 1.1. W95ws2setup.exe is a free download from the MS web site that installs Winsock 2 for Windows 95.


http://www.HelpwareGroup.com/