This is an old revision of the document!

Script Commands

Advertisement

call

Executes arbitrary remote shell command.

call <command>

If current session does not allow execution of arbitrary remote command separate shell session will be automatically opened.

The command must not require user input.

Alias: !

Example:

call touch index.html

cd

Changes remote working directory for active session.

cd [ <directory> ]

If directory is not specified, changes to home directory.

Advertisement

Examples:

cd /home/martin
cd

chmod

Changes permissions of one or more remote files.

chmod <mode> <file> [ <file2> ... ]

mode can be specified as three or four-digit octal number.

Filename can be replaced with wildcard to select multiple files.

Examples:

chmod 644 index.html about.html
chmod 1700 /home/martin/public_html
chmod 644 *.html

close

Closes session.

close [ <session> ]

Closes session specified by its number. When session is not specified, closes currently selected session.

Examples:

close 1
close

exit

Closes all sessions and terminates the program.

exit

Alias: bye

Advertisement

get

Downloads one or more files from remote directory to local directory.

get <file> [ [ <file2> ... ] <directory>\[ <newname> ] ]

Downloads one or more files from remote directory to local directory. If only one parameter is specified downloads the file to local working directory. If more parameters are specified, all except the last one specify set of files to download. The last parameter specifies target local directory and optionally operation mask to store file(s) under different name. Destination directory must end with backslash. Filename can be replaced with wildcard to select multiple files. To download more files to current working directory use ‘.\’ as the last parameter.

Use option command to set transfer options.

Alias: recv

Effective options: transfer, confirm, exclude, include

Examples:

get index.html
get index.html about.html .\
get index.html about.html d:\www\
get public_html/index.html d:\www\about.*
get *.html *.png d:\www\*.bak

help

Displays help for script commands.

help [ <command> [ <command2> ... ] ]

Displays list of commands when no parameters are specified. Displays help for each command when some are specified.

Alias: man

Examples:

help ls
help

keepuptodate

Watches for changes in local directory and reflects them on remote one.

Advertisement

keepuptodate [ <local directory> [ <remote directory> ] ]

When directories are not specified, current working directories are synchronized. To stop watching for changes press Ctrl-C. Obsolete files are deleted, if option synchdelete is on.

Note: Overwrite confirmations are always off for the command.

Effective options: transfer, synchdelete, exclude, include

Examples:

keepuptodate d:\www /home/martin/public_html
keepuptodate

lcd

Changes local working directory for all sessions.

lcd <directory>

Example:

lcd d:\