|
Command Line Options
The command line options allows you to use TurboFTP in an automated process
controlled by a batch file, script, macro etc.
Usage:
(a) turboftp [options] <source> <destination>
(b) turboftp [options] <session file>
Elements in square brackets [] are optional. Elements in angle brackets
<> are mandatory.
A. Usage (a)
<source> and <destination> contain local pathname and remote
path name. Remote pathname is in form of:
ftp://[user:password@]<host>[:port]/[pathname/][filename]
If user or password is not specified, TurboFTP will look for
account info for host in the Site
Address Book. It is recommended to store the account information in
the Address Book and omit it in the pathname. If you are making connection
to a secure FTP server (e.g. with SSL support), this is the only way to
work.
You can use wildcard mask in [filename].
Wildcard mask used here is treated as case insensitive. Subfolders under
[pathname] will NOT be transferred even if they match the [filename] pattern.
<source> or <destination> containing space, either in password,
pathname or filename, must be enclosed in double quotes("").
B. Usage (b)
<session> is the pathname of a session file. You can save the queue
into a session file (.tbx file) by using menu [Session | Save as]. TurboFTP
loads the session file, restores a list of queued files and starts transferring
them.
C. Available options:
If there is an identical option in TurboFTP's Options
dialog, the one specified in command line will be used instead, for example
the speed limit options.(-sd -su) and options to only download/upload new
files. Command line options, however, do not change the global configurations
stored in the registry, which will remain the same the next time you start
TurboFTP without command line options.
-sd <speed> Throttle download bandwidth to <speed> KBytes.
-su <speed> Throttle upload bandwidth to <speed> KBytes.
-min Minimized to system tray at startup.
-log[:LogFilePath] Enable logging. Optional log file path (must
include the log file name) can be put after a colon. If no log file path
specified (i.e. only -log), the log file path specified in [Options |
General] will be used. Use double quotes if there is space in the file
path and the whole option including '-log:' must be placed in the double
quotes. For example: "-log:c:\my log files\turboftp.log".
-s Sychronize <source> and <destination>. When used,
profile of the remote server in command line must have been stored in
Address Book, and the synchronization options defined in this site profile
will be used, including synchronzation direction (thus it doesn't care
which one is source or destination in the command line). Options -w, -d,
-u will also be ignore.
-w Overwrite without asking for confirmation. Overwrite files without
showing a "File Exist" dialog for user to choose among actions
like overwrite, skip, resume etc.
-d Only download newer files. Local file will be overwritten only
if it is older than the remote source file.
-u Only upload newer files. Remote file will be overwritten only
if it is older than the local source file.
-e[1-6] Specify action to perform upon transfer complete. Available
actions (1-6) are listed in [Options | Events | On Transfer Complete].
e1: Disconnect from site
e2: Hang up (also disconnect)
e3: Close TurboFTP
e4: Hang up and close TurboFTP
e5: Log off
e6: shutdown computer
D. Limitation
In Usage (a), you can only transfer multiple files using wildcard mask,
but cannot specify a sequence of files to transfer. To do so, you need to
create a session file and utilize the usage (b) approach.
Usage (a) doesn't support recursive transfer, i.e. subfolders under [pathname]
will be ignored even if they match the [filename] pattern. To include subfolders
in transfer, you can use usage (b). When TurboFTP sees an queued entry which
represents a folder, it will transfer items under that folder recursively.
You normally don't use the global filters (i.e. clear all filters in the
File Filtering dialog) when you
do automated transfers.
E. Examples
Download newer files with extension zip to c:\download. Minimized
to system tray while running, and maximum transfer speed set to 4KB/s. (Profile
of host.com is already stored in Address Book).
turboftp -sd 4 -min -d ftp://host.com/archive/*.zip c:\download
Upload txt file in c:\My Documents to a path named "April 2002"
on server host.com. Using john as the username and 5jd944K
as the password. Note that both the local and remote pathname contain a
space therefore double quotes are used.
turboftp -min "c:\My Documents\*.txt" "ftp://john:5jd944K@host.com/April
2002"
Load and launch session file test.tbx at startup and overwrite files
with no user confirmation (-w). Enable logging. Upon transfer complete
hang up the modem automatically (-e2).
turboftp -w -log -e2 "c:\My Documents\test.tbx"
Synchronize ftp://host.com/archive and c:\download, the synchronization
direction and scheme depend on the options in [Advanced Settings | Synchronization]
of host.com (should already stored in Address Book). Write log to mylog.log
which is stored in the current working directory.
turboftp -s -log:mylog.log
-min ftp://host.com/archive c:\download
|