updated the 03.22.2006

Go Up RushApp.FTP.Login build 527


Declare
procedure Login(
  NameList: string;
  Param: string;
  Flag: Integer
);

Description
Connect to one or more FTP Servers and jump to a FTP path or bookmark.

Parameters
NameList Specifies which FTP to connect, you can use a splitter to connect multiple FTP servers
Param Specifies a bookmark name or a directory name, or a empty string
Flag if you don't use Flag, use zero instead of it
RS_BOOKMARK Param is a bookmark
RS_CHECKBM if bookmark is invalid, don't connect it
RS_GHOST use !username as login name
RS_INVERT add or remove ' - ' from login password
RS_PAIR combine FTP name as pair
RS_POPUP to bring FTPRush on top
build 568 (licensed version)

Examples
//Connect to FTP1
RushApp.FTP.Login('FTP1','',0);

//Connect to FTP1 and FTP2
RushApp.FTP.Login('FTP1;FTP2','',0);

//Connect to FTP1 and change to directory /pub/
RushApp.FTP.Login('FTP1','/pub/',0);

//connect to FTP1 and FTP2 and change to bookmark 'public'
RushApp.FTP.Login('FTP1;FTP2','public',RS_BOOKMARK);

//connect to FTP1 and FTP2, if FTP2 have no bookmark named 'public', FTPRush will connect to FTP1 only
RushApp.FTP.Login('FTP1;FTP2','public',RS_BOOKMARK or RS_CHECKBM);

//connect to FTP1 and FTP2 and FTP3 with pair format: 'FTP1;FTP2' and 'FTP2:FTP3'
RushApp.FTP.Login('FTP1;FTP2;FTP3','public',RS_BOOKMARK or RS_PAIR);


Go Up RushApp.FTP.CWD build 527


Declare
procedure CWD(
  NameList: string;
  Param: string;
  Flag: Integer
);

Description
Let all or specifies connected/idle FTP Servers change remote directory.

Parameters
NameList Specifies which FTP need to change remote directory, you can use a splitter for multiple FTP servers, if it's empty then all connected idle FTP servers will change remote directory
Param Specifies a bookmark name or a directory
Flag if you don't use Flag, use zero instead of it
RS_BOOKMARK Param is a bookmark
RS_POPUP to bring FTPRush on top
build 568 (licensed version)

Examples
//tell all non-transfering connections change to bookmark 'public'
RushApp.FTP.CWD('','public',RS_BOOKMARK);

//tell all non-transfering connections change to directory '/public/'
RushApp.FTP.CWD('','/public/',0);

//tell 'FTP1' server change to bookmark 'pub'
RushApp.FTP.CWD('FTP1','pub',RS_BOOKMARK);

//tell 'FTP1' and 'FTP2' server change to bookmark 'pub'
RushApp.FTP.CWD('FTP1;FTP2','pub',RS_BOOKMARK);

//tell 'FTP1' server change to directory '/public/'
RushApp.FTP.CWD('FTP1','/public/',0);

//tell 'FTP1' and 'FTP2' server change to directory '/public/'
RushApp.FTP.CWD('FTP1;FTP2','/public/',0);


Go Up RushApp.FTP.RAW build 527


Declare
procedure RAW(
  NameList: string;
  Param: string;
  Flag: Integer
);

Description
Send raw command to all or specical connected/idle FTP Servers, if Param ANameList is empty string then send to all connected/idle FTP servers. this function will not send raw command to transfering connections.

Parameters
NameList Specifies which FTP to send raw command, you can use a splitter to connect multiple FTP servers, if it's empty then send to all connected idle FTP servers
Param Specifies a raw command to send
Flag if you don't use Flag, use zero instead of it
RS_LOGIN if no specifies FTP connected, then connect it first
RS_LOGOUT disconnect after executed raw command
RS_POPUP to bring FTPRush on top
build 568 (licensed version)
RS_ONE to only allow to execute command on one connected site even if there have 2+ same sites connected
build 568 (licensed version)

Examples
//send 'NOOP' to all connected non-transfering connections
RushApp.FTP.RAW('','NOOP',0);

//send 'NOOP' to all connected non-transfering connections then logout
RushApp.FTP.RAW('','NOOP',RS_LOGOUT);

//connect to 'FTP1' and send 'NOOP'
RushApp.FTP.RAW('FTP1','NOOP',RS_LOGIN);

//connect to 'FTP1' and 'FTP2', send 'NOOP', then logout
RushApp.FTP.RAW('FTP1;FTP2','NOOP',RS_LOGIN or RS_LOGOUT);


Go Up RushApp.FTP.Delete build 535


Declare
procedure Delete(
  NameList: string;
  Path: string;
  Name: string;
  Flag: Integer
);

Description
Delete folder or file from specifies connected/idle FTP Servers

Parameters
NameList Specifies which FTP need to delete folders or files, NameList can not be empty string
Path Specifies a bookmark name or a directory
Name a file name or a folder name, allows be a empty string
Flag if you don't use Flag, use zero instead of it
RS_BOOKMARK Param Path is a bookmark
RS_RECURSIVE when delete a folder, do not use recursive delete
RS_FOLDER tell FTPRush that's a folder, otherwise it will be executed as deleting file
RS_LOGOUT disconnect from FTP after deleted
RS_LOGIN connect to FTP when have no active FTP connections
RS_POPUP to bring FTPRush on top
build 568 (licensed version)

Examples
//delete file '/public/test.txt' from FTP1
RushApp.FTP.Delete('FTP1','/public','test.txt',0);

//delete file 'test.txt' from bookmark 'public' of FTP1 and FTP2
RushApp.FTP.Delete('FTP1;FTP2','public','test.txt',RS_BOOKMARK);

//delete file from folder 'test' from bookmark 'public' of FTP1
RushApp.FTP.Delete('FTP1','public','test',RS_FOLDER or RS_BOOKMARK);

//delete file from folder 'test' from bookmark 'public' of FTP1
RushApp.FTP.Delete('FTP1','public','test',RS_FOLDER or RS_BOOKMARK or RS_RECURSIVE);


Go Up RushApp.FTP.Transfer build 543


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, Timeout and SubCount params not ready in this version.

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 (licensed version)
RS_INVERT add or remove ' - ' from login password
(licensed version)
RS_NOCIRCLE Folder2 (n+1) won't start before folder1 (n) is all over
RS_CHECKLOGIN only works without RS_APPEND and ContainerID.
then when no free logins to transfer, FTPRush auto select a container which have the same transfer (src/dest) and append it

build 568 (licensed version)
RS_POPUP to bring FTPRush on top
build 568 (licensed version)
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) build 574
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 build 568 (licensed version)
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 *not implented*

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 *not implented*
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);


Go Up RushApp.FTP.RemoveQueue build 527


Declare
procedure RemoveQueue(
  Source: string;
  Dest: string;
  Param: string;
  Flag: Integer
);

Description
Remove Queue items from Queue window.

Parameters
Source Specifies source FTP name or a empty string, use 'local' to specifies upload queue
Dest Specifies dest FTP name or a empty string, use 'local' to specifies download queue
Param Specifies a condition for Queue dest path or dest filename/foldername, or a empty string
Flag You must use at least one flag as below
RS_TRANSFER remove transfering queues
RS_NORMAL remove non-transfering queues
RS_FAIL remove failed queues
RS_WAITING remove waiting queues (with blue clock icon)
RS_WILD Param condition is wildcard
RS_EXPR Param condition is regular expression
RS_FULLPATH Use queue dest full path to match Param condition, otherwise only use queue dest name
RS_CURRENT remove queues from current window only
RS_POPUP to bring FTPRush on top
build 568 (licensed version)

Examples
//Clear all queues from all window
RushApp.FTP.RemoveQueue('','','',RS_TRANSFER or RS_NORMAL or RS_WAITING);

//Clear all queues from current window
RushApp.FTP.RemoveQueue('','','',RS_TRANSFER or RS_NORMAL or RS_WAITING or RS_CURRENT);

//Remove all download queue
RushApp.FTP.RemoveQueue('','local','',RS_TRANSFER or RS_NORMAL or RS_WAITING or RS_CURRENT);

//Remove all upload queue
RushApp.FTP.RemoveQueue('local','','',RS_TRANSFER or RS_NORMAL or RS_WAITING or RS_CURRENT);

//remove all failed queue items from all window
RushApp.FTP.RemoveQueue('','','',RS_FAIL);

//remove all failed queue items from current window
RushApp.FTP.RemoveQueue('','','',RS_FAIL or RS_CURRENT);

//remove all queues matchs '/public*'
RushApp.FTP.RemoveQueue('','','/public*',RS_TRANSFER or RS_NORMAL or RS_WAITING or RS_CURRENT or RS_WILD or RS_FULLPATH);

//remove all queues which file name matchs '*2004*'
RushApp.FTP.RemoveQueue('','','*2004*',RS_TRANSFER or RS_NORMAL or RS_WAITING or RS_CURRENT or RS_WILD);

//remove all queues which dest name is 'FTP1'
RushApp.FTP.RemoveQueue('','FTP1','',RS_TRANSFER or RS_NORMAL or RS_WAITING);

//remove all queues which source name is 'FTP1'
RushApp.FTP.RemoveQueue('FTP1','','',RS_TRANSFER or RS_NORMAL or RS_WAITING);


Go Up RushApp.FTP.Logout build 527


Declare
procedure Logout(
  NameList: string;
  Flag: Integer
);

Description
Disconnect from one or more FTP Servers, If Param ANameList is empty string, all idle FTP connections will be disconnected.

Parameters
NameList Specifies which FTP to disconnect, you can use a splitter to connect multiple FTP servers, a empty string means disconnect from all active/idle FTP connections(non-transfering)
Flag if you don't use Flag, use zero instead of it
RS_ASYNC when use this flag, FTPRush will do a disconnect action after command executed.
RS_POPUP to bring FTPRush on top
build 568 (licensed version)

Examples
//logout from all idle FTP connections
RushApp.FTP.Logout('',0);

//logout from connections which named 'FTP1'
RushApp.FTP.Logout('FTP1',0);

//logout from connections which named 'FTP1' or 'FTP2'
RushApp.FTP.Logout('FTP1;FTP2',0);

//send command 'NOOP' to 'FTP1', after 'NOOP' be executed, then disconnect from 'FTP1'
RushApp.FTP.Raw('FTP1','NOOP',0);
RushApp.FTP.Logout('FTP1',RS_ASYNC);


Go Up About the Dll mIRC


How to install
Put rushmirc.dll in the mirc directory.

How to call
In mIRC type: /dll rushmirc.dll RushScript RushApp.FTP...


Go Up Changelog


03.22.2006
[+] NO_MKD flag in RushApp.FTP.Transfer