CNS Plug-ins

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:

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-StyleNew-Style
doFTP-AppendUse FTPit_UploadFile with the "AppendToFile" parameter set to True.
doFTP-AppendTextUse FTPit_UploadText with the "AppendToFile" parameter set to True.
doFTP-ChangeDirFTPit_ChangeRemoteDir
doFTP-ChangeDirUpFTPit_ChangeRemoteDirUp
doFTP-CompletedScriptThe "CompletedScript" functionality is now incorporated into each of the Transfer functions as a parameter.
doFTP-ConnectFTPit_Connect
doFTP-CurrentDirFTPit_GetCurrentRemoteDir
doFTP-DataPortRangeEndThis 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-DataPortRangeStartThis 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-DeleteFTPit_DeleteRemoteFile
doFTP-DisconnectFTPit_Disconnect
doFTP-GetFTPit_DownloadFile
doFTP-GetLocalRootUse FTPit_GetLocalNamedPath with the parameter "Root".
doFTP-GetPathToDBUse FTPit_GetLocalNamedPath with the parameter "Database".
doFTP-GetPathToFMUse FTPit_GetLocalNamedPath with the parameter "FileMaker".
doFTP-GetQueueFTPit_GetQueueList
doFTP-GetTextFTPit_DownloadText
doFTP-HideStatusUse FTPit_StatusWindow with the "Action" parameter set to "Hide".
doFTP-HostThis 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-IsConnectedFTPit_IsConnected
doFTP-LastCompletedFTPit_GetLastResult
doFTP-ListFirstUse FTPit_GetRemoteListItem with the parameter "First".
doFTP-ListNextUse FTPit_GetRemoteListItem with the parameter "Next".
doFTP-LocalChangeDirFTPit_ChangeLocalDir
doFTP-LocalChangeDirUpFTPit_ChangeLocalDirUp
doFTP-LocalCurrentDirFTPit_GetCurrentLocalDir
doFTP-LocalDeleteFTPit_DeleteLocalFile
doFTP-LocalListFirstUse FTPit_GetLocalListItem with the parameter "First".
doFTP-LocalListNextUse FTPit_GetLocalListItem with the parameter "Next".
doFTP-LocalMakeDirFTPit_MakeLocalDir
doFTP-LocalRemoveDirFTPit_RemoveLocalDir
doFTP-LocalRenameFTPit_RenameLocalFile
doFTP-LocalSizeFTPit_GetLocalFileSize
doFTP-MakeDirFTPit_MakeRemoteDir
doFTP-MoveStatusUse FTPit_StatusWindow with the "Action" parameter set to "Move".
doFTP-PassiveThis 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-PasswordThis 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-PortThis 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-PutFTPit_UploadFile
doFTP-PutTextFTPit_UploadText
doFTP-QuoteFTPit_SendRemoteCommand
doFTP-RegisterFTPit_Register
doFTP-RemoveDirFTPit_RemoveRemoteDir
doFTP-RenameFTPit_RenameRemoteFile
doFTP-ShowStatusUse FTPit_StatusWindow with the "Action" parameter set to "Show".
doFTP-SizeFTPit_GetRemoteFileSize
doFTP-TextAcquireThere is no equivalent for this function in FTPit Pro because the FTPit_DownloadText function returns all the text directly to you.
doFTP-TextAppendThere 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-TextAssignThere 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-TypeThe "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-UsernameThis 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-VersionFTPit_Version
doFTP-WaitForQueueThere 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-StyleOld-Style
FTPit_AddAccountNo Equivalent; Accounts did not exist in Classic FTPit
FTPit_ChangeLocalDirdoFTP-LocalChangeDir
FTPit_ChangeLocalDirUpdoFTP-LocalChangeDirUp
FTPit_ChangeRemoteDirdoFTP-ChangeDir
FTPit_ChangeRemoteDirUpdoFTP-ChangeDirUp
FTPit_ConfigureNo Equivalent
FTPit_ConfigureAccountNo Equivalent; Accounts did not exist in Classic FTPit
FTPit_ConnectdoFTP-Connect
FTPit_CopyLocalFileNo Equivalent
FTPit_DeleteLocalFiledoFTP-LocalDelete
FTPit_DeleteRemoteFiledoFTP-Delete
FTPit_DisconnectdoFTP-Disconnect
FTPit_DownloadDirNo Equivalent
FTPit_DownloadFiledoFTP-Get
FTPit_DownloadTextdoFTP-GetText
FTPit_ExportContainerNo Equivalent
FTPit_GetAccountNamesNo Equivalent; Accounts did not exist in Classic FTPit
FTPit_GetAccountOptionNo Equivalent; Accounts did not exist in Classic FTPit
FTPit_GetCurrentLocalDirdoFTP-LocalCurrentDir
FTPit_GetCurrentRemoteDirdoFTP-CurrentDir
FTPit_GetLastResultdoFTP-LastCompleted
FTPit_GetLocalFileSizedoFTP-LocalSize
FTPit_GetLocalListCountNo Equivalent
FTPit_GetLocalListItemIn Classic FTPit, you would call doFTP-LocalListFirst followed by several calls to doFTP-LocalListNext until doFTP-LocalListNext returned nothing
FTPit_GetLocalNamedPathdoFTP-GetLocalRoot, doFTP-GetPathToDB, or doFTP-GetPathToFM
FTPit_GetQueueListdoFTP-GetQueue
FTPit_GetRemoteFileSizedoFTP-Size
FTPit_GetRemoteListCountNo Equivalent
FTPit_GetRemoteListItemIn Classic FTPit, you would call doFTP-ListFirst followed by several calls to doFTP-ListNext until doFTP-ListNext returned nothing
FTPit_ImportContainerNo Equivalent
FTPit_IsConnecteddoFTP-IsConnected
FTPit_LocalDirExistsNo Equivalent
FTPit_LocalFileExistsNo Equivalent
FTPit_MakeLocalDirdoFTP-LocalMakeDir
FTPit_MakeRemoteDirdoFTP-MakeDir
FTPit_MoveLocalFileNo Equivalent
FTPit_QuickDownloadNo Equivalent
FTPit_QuickUploadNo Equivalent
FTPit_RegisterdoFTP-Register
FTPit_RemoteDirExistsNo Equivalent
FTPit_RemoteFileExistsNo Equivalent
FTPit_RemoveAccountNo Equivalent; Accounts did not exist in Classic FTPit
FTPit_RemoveLocalDirdoFTP-LocalRemoveDir
FTPit_RemoveRemoteDirdoFTP-RemoveDir
FTPit_RenameLocalFiledoFTP-LocalRename
FTPit_RenameRemoteFiledoFTP-Rename
FTPit_SelectLocalDirWithDialogNo Equivalent
FTPit_SelectLocalFileWithDialogNo Equivalent
FTPit_SendRemoteCommanddoFTP-Quote
FTPit_SetAccountOptionNo Equivalent; Accounts did not exist in Classic FTPit
FTPit_StatusWindowdoFTP-ShowStatus, doFTP-HideStatus, or doFTP-MoveStatus
FTPit_UploadDirNo Equivalent
FTPit_UploadFiledoFTP-Put
FTPit_UploadTextdoFTP-PutText
FTPit_VersiondoFTP-Version