Porting Guide
Porting Older Database to use new FTPit Pro Functions
This document is for users who have developed databases using the Classic version of FTPit and wish to upgrade to the new FTPit Pro functions. By updating your databases to the new functions, you will be able to take full advantage of the new plug-in.
As of v3.0.0, Backward Compatibility has been removed from FTPit Pro.
Notes:FTPit Pro does have a “Backward Compatibility” option in its Configuration Dialog (accessible through the FileMaker(R) Pro Preferences dialog). Using this option should allow you to use your old databases with FTPit Pro without any scripting changes. However, in some cases Backward Compatibility may not work and it is recommended that all users upgrade their scripts to the new functions. By setting the “Backward Compatibility” option to “Both”, you will be able to upgrade your scripts as you get to them, allowing you to have a mix of Old- and New-style functions. For more information about backward compatibility, see the “How do I turn on the Old Style Functions in the Pro plug-ins” FAQ article. The Backward Compatibility option may be removed in future versions of the plug-in at some point depending on changes in FileMaker and the plug-in itself.
Not all of the Function Equivalents below will be direct equivalents. There may be some functions that take more or less parameters and there may be instances where more than one Classic function is required to do the same as only one Pro function and vice versa. As an example, the Connect function now takes the name of an Account to connect to, which means you may have to use other functions to set up the Account first.
To determine what parameters are in your existing Old Style functions, see the FTPit External Function Reference section of the Classic FTPit Guide.
Example
Assume you have a calculation like the following that uses the Old Style Get function.
External(“doFTP-Get”, “installer.zip”)
First, we need to find the “doFTP-Get” function in the left column of the list at the end of this page. Then look at the right column to find the New Style equivalent is the “FTPit_DownloadFile” function. Find that function in the Function Reference to see how it is used.
FTPit_DownloadFile ( RemoteFile ; CompletedScript ; LocalFile ; AppendToFile ; UseASCIIMode )
Next, we need to determine what parameters we are using in the Old Style function. To do so, find the Old Style function in the Classic Plug-in Function Browser. From the Classic Plug-in Function Browser, we see the function looks like:
External(“doFTP-Get”, “filename”)
This tells us that the “installer.zip” value of our Old Style Function is the “filename” parameter, which is the file we are going to download with the plug-in. Now we plug the “installer.zip” value into the filename parameter of the New Style function. The New Style function’s filename parameter is actually called “RemoteFile”, but it serves the same purpose. The New Style function would now look like:
FTPit_DownloadFile ( “installer.zip” )
Since we did not need the optional parameters, they were omitted from the New Style function. Be sure to check the Function Reference to see what each parameter does and which are optional.
Conversion Chart
Below you will find two lists of Function Equivalents. The first list is an alphabetical list of old-style functions with their new-style equivalents, while the second list is an alphabetical list of new-style functions with their old-style equivalents.
Old-Style to New-Style | |
---|---|
Old-Style | New-Style |
doFTP-Append | Use FTPit_UploadFile with the "AppendToFile" parameter set to True. |
doFTP-AppendText | Use FTPit_UploadText with the "AppendToFile" parameter set to True. |
doFTP-ChangeDir | FTPit_ChangeRemoteDir |
doFTP-ChangeDirUp | FTPit_ChangeRemoteDirUp |
doFTP-CompletedScript | The "CompletedScript" functionality is now incorporated into each of the Transfer functions as a parameter. |
doFTP-Connect | FTPit_Connect |
doFTP-CurrentDir | FTPit_GetCurrentRemoteDir |
doFTP-DataPortRangeEnd | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "DataPortRangeEnd" as the "OptionName" parameter. |
doFTP-DataPortRangeStart | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "DataPortRangeStart" as the "OptionName" parameter. |
doFTP-Delete | FTPit_DeleteRemoteFile |
doFTP-Disconnect | FTPit_Disconnect |
doFTP-Get | FTPit_DownloadFile |
doFTP-GetLocalRoot | Use FTPit_GetLocalNamedPath with the parameter "Root". |
doFTP-GetPathToDB | Use FTPit_GetLocalNamedPath with the parameter "Database". |
doFTP-GetPathToFM | Use FTPit_GetLocalNamedPath with the parameter "FileMaker". |
doFTP-GetQueue | FTPit_GetQueueList |
doFTP-GetText | FTPit_DownloadText |
doFTP-HideStatus | Use FTPit_StatusWindow with the "Action" parameter set to "Hide". |
doFTP-Host | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "Host" as the "OptionName" parameter. |
doFTP-IsConnected | FTPit_IsConnected |
doFTP-LastCompleted | FTPit_GetLastResult |
doFTP-ListFirst | Use FTPit_GetRemoteListItem with the parameter "First". |
doFTP-ListNext | Use FTPit_GetRemoteListItem with the parameter "Next". |
doFTP-LocalChangeDir | FTPit_ChangeLocalDir |
doFTP-LocalChangeDirUp | FTPit_ChangeLocalDirUp |
doFTP-LocalCurrentDir | FTPit_GetCurrentLocalDir |
doFTP-LocalDelete | FTPit_DeleteLocalFile |
doFTP-LocalListFirst | Use FTPit_GetLocalListItem with the parameter "First". |
doFTP-LocalListNext | Use FTPit_GetLocalListItem with the parameter "Next". |
doFTP-LocalMakeDir | FTPit_MakeLocalDir |
doFTP-LocalRemoveDir | FTPit_RemoveLocalDir |
doFTP-LocalRename | FTPit_RenameLocalFile |
doFTP-LocalSize | FTPit_GetLocalFileSize |
doFTP-MakeDir | FTPit_MakeRemoteDir |
doFTP-MoveStatus | Use FTPit_StatusWindow with the "Action" parameter set to "Move". |
doFTP-Passive | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "Passive" as the "OptionName" parameter. |
doFTP-Password | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "Password" as the "OptionName" parameter. |
doFTP-Port | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "Port" as the "OptionName" parameter. |
doFTP-Put | FTPit_UploadFile |
doFTP-PutText | FTPit_UploadText |
doFTP-Quote | FTPit_SendRemoteCommand |
doFTP-Register | FTPit_Register |
doFTP-RemoveDir | FTPit_RemoveRemoteDir |
doFTP-Rename | FTPit_RenameRemoteFile |
doFTP-ShowStatus | Use FTPit_StatusWindow with the "Action" parameter set to "Show". |
doFTP-Size | FTPit_GetRemoteFileSize |
doFTP-TextAcquire | There is no equivalent for this function in FTPit Pro because the FTPit_DownloadText function returns all the text directly to you. |
doFTP-TextAppend | There is no equivalent for this function in FTPit Pro because the FTPit_UploadText function has a parameter for the Text you want to Upload. |
doFTP-TextAssign | There is no equivalent for this function in FTPit Pro because the FTPit_UploadText function has a parameter for the Text you want to Upload. |
doFTP-Type | The "Type" functionality (Binary versus ASCII transfers) is now incorporated into each of the Transfer functions as the UseASCIIMode parameter. (In FTPit_UploadText, specify "ASCII" as the "LineEndingType" to achieve the same thing.) |
doFTP-Username | This value is set for each account using the Account Configuration Dialog (FTPit_ConfigureAccount) or with the FTPit_SetAccountOption function using "Username" as the "OptionName" parameter. |
doFTP-Version | FTPit_Version |
doFTP-WaitForQueue | There currently is no equivalent for this function in FTPit Pro. If you want the plug-in to completely transfer your files before returning control to your script, simply do not specify the "CompletedScript" parameter in the Transfer functions. |
New-Style to Old-Style | |
---|---|
New-Style | Old-Style |
FTPit_AddAccount | No Equivalent; Accounts did not exist in Classic FTPit |
FTPit_ChangeLocalDir | doFTP-LocalChangeDir |
FTPit_ChangeLocalDirUp | doFTP-LocalChangeDirUp |
FTPit_ChangeRemoteDir | doFTP-ChangeDir |
FTPit_ChangeRemoteDirUp | doFTP-ChangeDirUp |
FTPit_Configure | No Equivalent |
FTPit_ConfigureAccount | No Equivalent; Accounts did not exist in Classic FTPit |
FTPit_Connect | doFTP-Connect |
FTPit_CopyLocalFile | No Equivalent |
FTPit_DeleteLocalFile | doFTP-LocalDelete |
FTPit_DeleteRemoteFile | doFTP-Delete |
FTPit_Disconnect | doFTP-Disconnect |
FTPit_DownloadDir | No Equivalent |
FTPit_DownloadFile | doFTP-Get |
FTPit_DownloadText | doFTP-GetText |
FTPit_ExportContainer | No Equivalent |
FTPit_GetAccountNames | No Equivalent; Accounts did not exist in Classic FTPit |
FTPit_GetAccountOption | No Equivalent; Accounts did not exist in Classic FTPit |
FTPit_GetCurrentLocalDir | doFTP-LocalCurrentDir |
FTPit_GetCurrentRemoteDir | doFTP-CurrentDir |
FTPit_GetLastResult | doFTP-LastCompleted |
FTPit_GetLocalFileSize | doFTP-LocalSize |
FTPit_GetLocalListCount | No Equivalent |
FTPit_GetLocalListItem | In Classic FTPit, you would call doFTP-LocalListFirst followed by several calls to doFTP-LocalListNext until doFTP-LocalListNext returned nothing |
FTPit_GetLocalNamedPath | doFTP-GetLocalRoot, doFTP-GetPathToDB, or doFTP-GetPathToFM |
FTPit_GetQueueList | doFTP-GetQueue |
FTPit_GetRemoteFileSize | doFTP-Size |
FTPit_GetRemoteListCount | No Equivalent |
FTPit_GetRemoteListItem | In Classic FTPit, you would call doFTP-ListFirst followed by several calls to doFTP-ListNext until doFTP-ListNext returned nothing |
FTPit_ImportContainer | No Equivalent |
FTPit_IsConnected | doFTP-IsConnected |
FTPit_LocalDirExists | No Equivalent |
FTPit_LocalFileExists | No Equivalent |
FTPit_MakeLocalDir | doFTP-LocalMakeDir |
FTPit_MakeRemoteDir | doFTP-MakeDir |
FTPit_MoveLocalFile | No Equivalent |
FTPit_QuickDownload | No Equivalent |
FTPit_QuickUpload | No Equivalent |
FTPit_Register | doFTP-Register |
FTPit_RemoteDirExists | No Equivalent |
FTPit_RemoteFileExists | No Equivalent |
FTPit_RemoveAccount | No Equivalent; Accounts did not exist in Classic FTPit |
FTPit_RemoveLocalDir | doFTP-LocalRemoveDir |
FTPit_RemoveRemoteDir | doFTP-RemoveDir |
FTPit_RenameLocalFile | doFTP-LocalRename |
FTPit_RenameRemoteFile | doFTP-Rename |
FTPit_SelectLocalDirWithDialog | No Equivalent |
FTPit_SelectLocalFileWithDialog | No Equivalent |
FTPit_SendRemoteCommand | doFTP-Quote |
FTPit_SetAccountOption | No Equivalent; Accounts did not exist in Classic FTPit |
FTPit_StatusWindow | doFTP-ShowStatus, doFTP-HideStatus, or doFTP-MoveStatus |
FTPit_UploadDir | No Equivalent |
FTPit_UploadFile | doFTP-Put |
FTPit_UploadText | doFTP-PutText |
FTPit_Version | doFTP-Version |