HOME DOWNLOAD PURCHASE DOCS SAMPLES SUPPORT CONTACT
EaseWe FTP OCX ActiveX Control Documentation
1.Properties:
AllowType
Busy
Connected
ErrorInfo
ErrorNumber
DenyType
FileSize
KeepAliveInterval
LangInfo
LeftTime
LocalPath
MaxSize
MaxSpeed
MessageInfo
Overwrite
Passive
Password
Percent
Percent2
Port
QueueIndex
QueueTotal
RetryTimes
RemotePath
RenameRule
ReplaceIndex
ServerName
Speed
Timeout
TransferredSize
Username
UseSSL
UseExSSL
Version
2.Methods:
Abort
AbortCurrent
Close
Connect
CreateDirectory
Disconnect
DeleteFile
Download
ExistDirectory
ExistFile
FormatSize
FormatTime
GetCurrentDirectory
GetFileExtension
GetFileInfo
GetFileList
GetFileName
GetFileSize
GetLocalFileCount
GetLocalFileDate
GetLocalFileSize
GetLocalFolderSize
GetParentPath
LocalFileExists
LocalFolderExists
RemoveDirectory
RenameFile
SetCurrentDirectory
ShowFolderBrowserDialog
ShowOpenFileDialog
ShowSaveFileDialog
Upload
3.Events:
OnMessage
OnTransfer
1.Properties:Back to top
AllowType:
The file type allowed to be uploaded/downloaded,each separated by ';',such as "txt;doc";
Busy:
Indicates whether an operation is in progress.
If an operation is in progress this value is true, otherwise false.
Connected:
Checks whether or not the client is connected to server,return true on success and false on failure;
DenyType:
The file type denied to be uploaded/downloaded,each separated by ';',such as "exe;bat";
ErrorInfo:
Detailed description of error;
ErrorNumber:
The number of error;View error number listing
FileSize:
The total size of the file in transferring;
KeepAliveInterval:
Keep alive every "KeepAliveInterval" seconds;
LangInfo:Back to top
Gets or sets the caption of the ftp ocx;
The step of supporting other languages:
1.Get all the words of the ocx to a string variable from property 'FtpLibrary1.LangInfo';
2.Translate the words from english into other languages.
3.Set the translated words to property 'FtpLibrary1.LangInfo' for other languages supported.
LeftTime:
The remaining time of current transfer, unit is second;
LocalPath:Back to top
The file path to be uploaded or the save path of download;
MaxSize:
The maximum file size of a transfer, unit is MB;
MaxSpeed:
The maximum speed of upload or download,unit is KB;
MessageInfo:
The information responsed from ftp server.

It is always used in event 'OnMessage';
Overwrite:
Specifies whether or not to overwrite the existing files.
1:Default:Display "Confirm File Replace" dialog;

2.If it's true,the file will be replaced;
3.If it's false,the transfer will resume automatically;

You can also control the dialog by property ReplaceIndex;
Passive:
Specifies whether or not to use passive mode, default is true;
Password:Back to top
The password to log in ftp server;
Percent:
The percent of the file transfer completed;

It is always used in event 'OnTransfer';
Percent2:
The permillage of the file transfer completed, maximum value is 1000;
QueueIndex:
The sequence of transferring file on transfer queue.

It is always used in event 'OnTransfer';
QueueTotal:
The number of files on transfer queue.

It is always used in event 'OnTransfer';
RetryTimes:
Automatic reconnect and resume transfer how many times when the connection is lost or broken.
RemotePath:
The remote file path on server.
Port:
The port number of server, default is 21;
RenameRule:
The rule of rename a file automatically;
Default is "{oldname}1",it means that {oldname} will be replaced with old file name;
For example:
If the old file name is "test.htm",the new file name will become "test1.htm" after rename.

ReplaceIndex:
The value of 'ReplaceIndex' is used to control the buttons in 'Confirm File Replace'.

The selectable value of 'ReplaceIndex' is:

0:Show 'Confirm file Replace' dialog;

1:Overwrite;
2:Resume;
3:Skip;
4:Rename;(The rule of rename is set by property 'RenameRule')

ServerName:
Host name of server;
Speed:
Transfer speed, unit is bytes/s;
You can call the method "FormatSize(FtpLibrary1.Speed)/s" to convert the unit to "KB/s" or "MB/s";

It is always used in event 'OnTransfer';
Timeout:
Specifies the timeout in seconds for the connection, default is 30 seconds;
TransferredSize:
The size of the file transfer completed, unit is byte;

It is always used in event 'OnTransfer';
Username:
The user name to log in ftp server, default is anonymous;
UseSSL:
Using Implicit SSL Connection.
UseExSSL:
Using Explicit SSL Connection.
Version:
The version of ActiveX control;
2.Methods:Back to top
Abort():
Aborts transferring all the files on queue;
AbortCurrent():
Aborts current transfer;
Close():
Closes connection; (Before v5.0.x.x is named "Disconnect()");
Connect():
Connects to ftp server, return true on success and false on failure;

CreateDirectory(DirectoryPath):
Creates a new directory, return true on success and false on failure;

DeleteFile(FilePath):
Deletes a file on server, return true on success and false on failure;
Disconnect():
Replaced by "Close()" after v5.0.x.x;
Download():
Downloads the files on server to local computer, return true on success and false on failure;
ExistDirectory(DirectoryName):Back to top
Check whether or not directory exists on server;
ExistFile(FileName):
Check whether or not file exists on server;
FormatSize(FileSize):
Convert file size from bytes to human readable format.
eg.2048 becomes 2KB,2048000 becomes 2MB.
FormatTime(Seconds):
Convert LeftTime from seconds to "hh:mm:ss".
eg.FormatTime(290) will return "04:50".
GetCurrentDirectory():
Returns the current/working directory on server;
GetFileExtension(FilePath):
Returns the file extension name of the file;
GetFileInfo(FilePath):Back to top
Returns the size and last modified date of file on server
the format of the return string is:"file name*file size,file date"
each item is separated by *,such as: "test.txt*1825*2011-09-01 15:58:16";

GetFileList(DirectoryPath):
Get a list of subfolders and files in folder on server,
the format of the return string is:"type*file name*file size,file date|......"
each file is separated by |,each item is separated by *,such as:
"0*test.txt*1825*2011-09-01 15:58:16|1*Folder*0*2011-09-01 15:58:16";
type:0 is file,1 is folder.

GetFileName(FilePath):
Returns the file name with extension of the file;
GetFileSize(FilePath):
Returns the size of file on server.
If file not found return -1;
If an error occurs return -2;
GetLocalFileDate(FilePath):
Returns the last modified date of local file.;
GetLocalFileSize(FilePath):
Returns the size of local file;
GetLocalFileCount(FolderPath):
Returns the number of files in local folder;
GetLocalFolderSize(FolderPath):
Returns the size of local folder;
GetParentPath(FolderPath):
Returns the parent path of a file or folder;
LocalFileExists(FilePath):
Checks whether the local file is existing; return true on success and false on failure;
LocalFolderExists(FolderPath):
Checks whether the local folder is existing; return true on success and false on failure;
RemoveDirectory(DirectoryPath):
Deletes a directory from server;return true on success and false on failure;
RenameFile(OldFileName,NewFileName):
Renames the remote file or directory on server;return true on success and false on failure;
SetCurrentDirectory(DirectoryPath):
Changes the current/working directory on server;return true on success and false on failure;
ShowFolderBrowserDialog():
Show "Folder Browser" dialog;
ShowOpenFileDialog():
Show "Open File" dialog;
The parameters are replaced by blow Properties after v4.6.x.x;
1.SFDFileName:Default file name on file select dialog;
2.SFDFilter/AllowType:Allowable file type;
3.SFDInitialDir:Initial directory;
4.SFDMultiple:Whether support multi-select,defaut is true;
5.SFDTitle:The title of the dialog;
ShowSaveFileDialog(FileName):
Show "Save File" dialog;
FileName: The default file name displays in "Save File" dialog.
1.SFDInitialDir:Initial directory;
2.SFDTitle:The title of the dialog;
Upload():
Uploads local files to server. return true on success and false on failure
3.Events:Back to top
OnMessage:
The event is fired when the ocx get response from server;
OnTransfer:
The event occurs during a file transfer.
It's always use to display the transfer process;

 

Home Download Purchase Documentation Samples Screenshots Support Contact Links