The built-in command line interface can be used by other applications or by advanced users to control the application. The current implementation allows users to start requests of all types, to register new data sources, etc.
The basic format is as follows:
bitkinex.exe [CMD] {/[OPT1]} {/[OPT2]} ... {/[OPTn]} [URI1] ... {[URIn]}
Where:
[CMD] | BitKinex command |
---|---|
[OPT] | Optional command parameter |
[URI] |
Uniform Resource Identifier in one of the following forms:
|
Commands
The following commands are supported by the current version:
Command | Description | Supported parameters |
---|---|---|
BROWSE | Opens a browse window for the specified URI. A temporary data source is created automatically in case no data source matching the URI exists. | /noinfo, /noerr, /norest, /result |
CP | Starts a file transfer request on the selected data source. The source URI must be always specified whereas the destination URI is optional. A temporary data source is created automatically in case no data source matching the source URI exists. The user will be prompted to specify the destination location in case it has been ommited on the command line. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /delsrc, /auto_exit, /auto_suspend, /auto_pwroff |
CRC32 | Computes the CRC32 checksum of the file identified by the URI. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
DROP {ALL/ACTIVE/HISTORY/[ID]} | Removes a request identified by [ID] from the request list. Use "ALL" instead of a request [ID] in case you want to remove all requests. The command does not affect running requests. | /noerr, |
DSEDIT | Opens a properties dialog for the data source specified by the URI. A temporary data source is created automatically in case no data source matching the URI exists. | /noinfo, /noerr, /norest, /result |
LIST | Retrieves the content of the directory identified by the URI. Use the /result switch to store the file and subdirectory names into a file. A temporary data source is created automatically in case no data source matching the URI exists. This command has been designed to provide directory listings from the the remote console. | /force, /noinfo, /noerr, /norest, /result, /auto_exit, /auto_suspend, /auto_pwroff |
MD5 | Computes the MD5 hash of the file identified by the URI. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
MKDIR | Creates a new directory at the location specified by the URI. A temporary data source is created automatically in case no data source matching the URI exists. | /force, /noinfo, /noerr, /norest, /result, /auto_exit, /auto_suspend, /auto_pwroff |
MIRROR1, MIRROR2 | Starts a mirroring request on the selected data source. MIRROR1 corresponds to a "simple" mirroring request, MIRROR2 starts a "synchro" request (files which do not exist at the source location will be removed from the destination). The source URI must always be specified whereas the destination URI is optional. A temporary data source is created automatically in case no data source matching the source URI exists. The user will be prompted to specify the destination location in case it has been ommited on the command line. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /timing, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
OPEN | Opens the file identified by the URI using a program associated with that file extension. A temporary data source is created automatically in case no data source matching the source URI exists. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
QUIT | Terminates BitKinex (if running). | /force, |
REG |
Creates a new data source with the server address, login name and password specified in the first URI.
The second URI must specify the data source name and location in the data source pane. It must be in the form {[fldr1]|} ... {[fldrn]|}[datasrc]. Please note that this URI never begins with a protocol specifier. The [fldr1] (if specified) is the name of the first folder under the respective protocol node. Example: bitkinex.exe reg /noinfo ftp://john:mypasswd@www.myserver.com/documents/archive.zip "mysites|test" creates a new FTP data source called "test" and located in the "mysites" folder. |
/noinfo, /noerr, /norest, /rdonly, /result /usenew |
REN | Renames the file or directory specified by the source URI. A temporary data source is created automatically in case no data source matching the source URI exists. The user will be prompted to specify the destination location in case it has been ommited on the command line. | /force, /noinfo, /noerr, /norest, /result, /auto_exit, /auto_suspend, /auto_pwroff |
RESTART {ALL/ACTIVE/HISTORY[ID]} | Restarts a stopped request identified by [ID]. Use "ALL" instead of a request [ID] in case you want to restart all stopped requests. | /noerr, |
RESUME {ALL/ACTIVE/HISTORY/[ID]} | Resumes a paused request identified by [ID]. Use "ALL" instead of a request [ID] in case you want to resume all paused requests. | /noerr, |
RM | Deletes the file or directory specified by the URI. A temporary data source is created automatically in case no data source matching the URI exists. | /force, /noinfo, /noerr, /norest, /result, /auto_exit, /auto_suspend, /auto_pwroff |
SHA1 | Computes the SHA1 hash of the file identified by the URI. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
SHOW {ALL/ACTIVE/HISTORY/[ID]} | Returns status information about a request identified by [ID]. Use "ALL" instead of a request [ID] in case you want to list all requests. This command has been designed to provide status information from the remote console. | /noerr, |
SIGNAL {[SIGNAL_NAME]} | Sends a signal identified by [SIGNAL_NAME]. Requests listening for this signal (if any) will take the action specified on their Signals property page. | /noerr, |
STOP {ALL/ACTIVE/HISTORY/[ID]} | Stops a running request identified by [ID]. Use "ALL" instead of a request [ID] in case you want to stop all running requests. | /noerr, |
SYNCHRO | Starts a synchronization request on the selected data source. The source URI must always be specified whereas the destination URI is optional. A temporary data source is created automatically in case no data source matching the source URI exists. The user will be prompted to specify the destination location in case it has been ommited on the command line. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
UNREG | Unregisters (removes) the data source identified by the URI. | /noinfo, /noerr, /norest, /result |
VIEW | Displays the file content identified by the URI. A program associated with that file extension or a text editor specified in the main application settings will be used. A temporary data source is created automatically in case no data source matching the source URI exists. | /force, /noinfo, /noerr, /norest, /result, /skipsz, /skiptmsz, /binary, /ascii, /auto_exit, /auto_suspend, /auto_pwroff |
WATCH | Monitors the status of a server identified by the URI. | /noinfo, /noerr, /norest, /result |
Parameters
- /force - Starts the request with the "forced execution" parameter on. BitKinex will not prompt the user before removing or overwriting files. This parameter can lead to loss of data and should therefore be used with care.
- /noinfo - This option instructs BitKinex not to display the confirmation dialog allowing users to adjust the request parameters. BitKinex will use an existing data source (when available) or creates a temporary one automatically.
- /noerr - Use this option to suppress messages BitKinex would display when an error occurs.
- /norest - This option instructs BitKinex to skip the resumption of interrupted requests by application startup.
-
/result=[FILE] -
Because BitKinex processes requests asynchronously in parallel, each call of the bitkinex.exe returns immediately, without waiting for the result of the operation.
Therefore a method to determine the request termination status is needed.
This is important especially for programs which use the command line interface and which need to know when and with which status the started request terminates.
A file with the given name will be created upon request termination and has the following format:
File row Description VERSION identifies the version of the command line interface (e.g. "1.0") STATUS Can be either "0" or "1" where "1" indicates successful processing. MESSAGE This line represents the termination status as a text string. ERROR This line contains an error message in case the request couldn't be processed. - /skipsz - This option can be used with transfer commands (like CP or SYNCHRO) only. BitKinex will skip all files that already exist at the destination location and have the same size as the related files.
- /skiptmsz - This option can be used with transfer commands (like CP or SYNCHRO) only. BitKinex will skip all files that already exist at the destination location and have the same size and modification time as the related files.
-
/timing -
This option can be used with the MIRROR commands only.
The value specifies time intervals between two synchronization runs.
Use one of the following formats:
/timing=00:10:00 wait 10 minutes after each run /timing=daily:10:20:30 synchronize daily at 10:20:30 /timing=weekly:Mon,10:20:30 synchronize weekly, each Monday at 10:20:30 /timing=monthly:2,10:20:30 synchronize each second day in the month - /binary - This option can be used with transfer commands (like CP or SYNCHRO) only. When used, BitKinex transfers the files in binary mode rather than using the global settings.
- /ascii - This option can be used with transfer commands (like CP or SYNCHRO) only. When used, BitKinex transfers the files in ASCII mode (conversion of the end-of-line markers are performed) rather than using the global settings.
- /delsrc - This option can be used with transfer commands (like CP or SYNCHRO) only. BitKinex will delete all source files upon transfer completion (files which could not be copied will not be deleted).
- /rdonly - This option can be used with the REG command only. The data source will be created as read-only when set.
- /usenew - By choosing this option you will instruct BitKinex to create a new data source even if another data source with the same parameters already exists.
- /auto_exit - By choosing this option you will instruct BitKinex to terminate as soon as all requests are processed.
- /auto_suspend - By choosing this option you will instruct BitKinex to suspend the computer as soon as all requests are processed.
- /auto_pwroff - By choosing this option you will instruct BitKinex to turn the computer off as soon as all requests are processed.
Examples
-
bitkinex.exe cp /noinfo /force ftp://john:mypasswd@www.myserver.com/documents/archive.zip c:\Temp
Downloads the file "archive.zip" from the FTP server www.myserver.com (using "john" as name and "mypasswd" as password in the login sequence) to the local directory "C:\Temp". -
bitkinex.exe reg /noinfo /rdonly ftp://john:mypasswd@www.myserver.com/documents/archive.zip "mysites|test"
Creates a new read-only FTP data source called "test" and located in the "mysites" folder. -
bitkinex.exe unreg /noinfo "bitkinex://ftp|mysites|test|"
Removes the data source created with the previous command. -
bitkinex.exe rm /noinfo /result=C:\Temp\bkx1.res ftp://john:mypasswd@www.myserver.com/documents/archive.zip
Removes the file "archive.zip" from the FTP server www.myserver.com (using "john" as name and "mypasswd" as password in the login sequence). The result file "bkx1.res" containing the information about the termination status will be created in the "C:\Temp" directory upon the request completion. -
bitkinex.exe dsedit /noinfo "bitkinex://ftp|mysites|test|"
Opens the properties dialog for the data source "test".