Transfer
Declare
procedure Transfer(
Handle: Integer;
SrcList, SrcFolder, SrcItem, DesList, DesFolder, DesItem: string;
Flag: Integer;
FolderAllow, FolderSkip, FileAllow, FileSkip: string;
CompleteFlag: string;
RepeatCount: Integer;
RetryCount: Integer;
Timeout: Integer;
FolderSort, FileSort: Integer;
Depth, SubCount: Integer;
);
Description
Transfer Queue , support upload download and FXP
Parameters
Handle |
specifies which window to place queues, first window is 1, 2th window is 2..., if you do not use this param, set it to zero. |
SrcList |
SrcList is the source FTP name or a List of FTP names, if it's a list of FTP names, be splitted with RushApp.FTP.Splitter, This param be used for Download and FXP |
SrcFolder |
SrcFolder is the source folder name or a bookmark, for Upload, it's a Local folder path or a Local bookmark |
SrcItem |
SrcItem is the source folder or file name, for Upload, it's a Local folder name or file name |
DesList |
same as SrcList |
DesFolder |
same as SrcFolder |
DesItem |
same as SrcItem |
Flag |
If you don't use Flag, use zero instead of it. |
|
RS_FILE |
tell FTPRush this queue is a file, without this flag this queue is a folder |
|
RS_UP |
tell FTPRush this queue is upload mode, without this flag this queue is FXP mode |
|
RS_DOWN |
tell FTPRush this queue is download mode, without this flag this queue is FXP mode |
|
RS_DIRSRC |
specifies SrcFolder is a folder, without this flag, SrcFolder is a bookmark |
|
RS_DIRDES |
specifies DesFolder is a folder, without this flag, DesFolder is a bookmark |
|
RS_NOSKIP |
tell FTPRush do not use skiplist to filter DesItem and DesItem |
|
RS_APPEND |
tell FTPRush combines all queue items at ONE window, otherwise, every queue item running at a NEW window. |
|
RS_EXPR |
if includes this flag, FolderAllow, FolderSkip, FileAllow, FileSkip match Perl Expressions, otherwise match wildcard |
|
RS_LOGOUT |
disconnected from server after queue transferred |
|
RS_GHOST |
use !username as login name |
|
RS_INVERT |
add or remove ' - ' from login password |
|
RS_NOCIRCLE |
Folder2 (n+1) won't start before folder1 (n) is all over |
|
RS_CHECKLOGIN |
only works for without RS_APPEND and dont use ContainerID.
then when no free logins to transfer, FTPRush auto select a container which have the same transfer (src/dest) and append it |
|
RS_POPUP |
to bring FTPRush on top |
|
RS_DELEMPTYTABS |
close empty containers automatically |
|
RS_NOMKD |
when transferring folders with sub dirs, FTPRush will not create the sub dirs in dest FTP if sub dirs exists in dest FTP(just do CWD) |
FolderAllow |
Allow sub folders match FolderAllow param, can be a empty string |
FolderSkip |
Skip sub folders match FolderSkip param, can be a empty string |
FileAllow |
Allow sub files match FileAllow param, can be a empty string |
FileSkip |
Skip sub files match FileSkip param, can be a empty string |
CompleteFlag |
when set RepeatCount > 0, CompleteFlag can let the queue thread stop when thread found a folder/file name at Source/Destination directory list match the CompleteFlag, CompleteFlag only supports Perl Expressions |
RepeatCount |
indicates how many times to refresh for a folder |
RetryCount |
indicates retry count when transfer a file |
Timeout |
set timeout(seconds) for a FXP queue, when timeout and transfer not started, this queue will be removed *not implented* |
FolderSort |
define sort method for sub folders, set it to zero to use default sort method (sort by name ascending) |
|
RS_SORTDES |
specifies sort sorting as descending |
|
RS_SORTDATE |
specifies sort by date |
|
RS_SORTSIZE |
specifies sort by size |
FileSort |
define sort method for sub folders, set it to zero to use default sort method (sort by name ascending) |
|
RS_SORTDES |
specifies sort sorting as descending |
|
RS_SORTDATE |
specifies sort by date |
|
RS_SORTSIZE |
specifies sort by size |
Depth |
depth of sub folders |
SubCount |
when transfer a folder includes sub folder/files, the first SubCount file/folders will be transferred. set it to zero to disable this feature |
Examples
//upload a file to FTP1 and logout
RushApp.FTP.Transfer(0, '', 'c:\temp', 'file1.jpg', 'FTP1', '/pictures', 'file1.jpg', RS_UP or RS_FILE or RS_DIRDES or RS_DIRSRC or RS_LOGOUT, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//download a folder from FTP1 and logout
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', '', '', 'c:\temp\test', '', RS_DOWN or RS_DIRDES or RS_DIRSRC or RS_LOGOUT, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a file from FTP1 to FTP2
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', 'file1.jpg', 'FTP2', '/test', 'file2.jpg', RS_FILE or RS_DIRDES or RS_DIRSRC, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a folder from FTP1 to FTP2
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', '', 'FTP2', '/test', '', RS_DIRDES or RS_DIRSRC, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a folder from FTP1 to FTP2 with latest file or folder only
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', '', 'FTP2', '/test', '', RS_DIRDES or RS_DIRSRC, '', '', '', '', '', 0, 0, 0, RS_SORTDATE or RS_SORTDES, 0, 0, 1);
//FXP a folder from FTP1 to FTP2 and FXP same folder from FTP1 to FTP3 at sametime
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', '', 'FTP2;FTP3', '/test', '', RS_DIRDES or RS_DIRSRC, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a folder from FTP1 to FTP2 then FXP same folder from FTP1 to FTP3
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', '', 'FTP2;FTP3', '/test', '', RS_DIRDES or RS_DIRSRC or RS_APPEND, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a folder(inside bookmark 'pub') from FTP1 to FTP2 and FTP2 to FTP3 at same time
RushApp.FTP.Transfer(0, '', '', '', 'FTP1;FTP2;FTP3', 'pub', 'pictures', 0, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a folder(inside bookmark 'pub') from FTP1 to FTP2(at window 3) and FTP2 to FTP3(at window 4) at same time
RushApp.FTP.Transfer(3, '', '', '', 'FTP1;FTP2;FTP3', 'pub', 'pictures', 0, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0);
//FXP a folder from FTP1 to FTP2 then FXP same folder from FTP1 to FTP3, and close empty tabs
RushApp.FTP.Transfer(0, 'FTP1', '/pictures', '', 'FTP2;FTP3', '/test', '', RS_DIRDES or RS_DIRSRC or RS_APPEND or RS_DELEMPTYTABS, '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0); |