Commands
When writing a command it is important to remember the following:
When passing multiple parameters to a command the parameter should be enclosed in double quotes " if the parameter may contain one or more spaces.
When performing a command directly the command is executed in the active browser pane or if the command is performed via the transfer queue then it is executed in the browser pane in where it was en-queued.
Key |
Description |
This is a global command and is not executed in the context of the active browser window. |
|
This command is executed in the context of the active browser window. |
|
This command can only be executed in the local browser window. |
|
This command can only be executed in the remote browser window. |
|
Special command. |
[<name of custom command>]
Execute a stored custom command. This can be used to create a custom command that then executes multiple commands. If the command is within a folder include the folder name as well i.e \Server\Admin\command.
[<path\to\text\file>]
Execute a custom command script stored in a external text file.
{ } Command Block
A command block is a FOR-EACH LOOP, whereby all of the commands within the block are executed for each item that is selected.
As of version 5.1 you can use multiple command blocks as well as nest them within each other.
Example:
{ RNFR %f RNTO $lowercase(%f) } |
/activate 1
Activate the left side browser pane.
/activate 2
Activate the right side browser pane.
/activate local
Activate the local side, assuming that one of the browser panes is set to the local browser.
You can use this to ensure that any preceding commands are performed in the local browser.
/activate remote
Activate the remote side.
/browser [1| 2] [local | remote]
This command can be used to toggle the browser between local and remote. 1 = left and 2 = right.
/busybox [text]
This command can be used to display a busy dialog during script execution with a cancel button to stop the the command script. Use [text] to set a short line of text to display on the dialog.
/cd <path>
Change to path in active side browser pane.
/clear cache [all]
Clears the remote directory cache of the active side.
Include the all parameter to clear the remote directory cache of any connected sites.
/clear console
This command can be used to clear the session status console window.
/checksfv "<filename>"
Check a local SFV file and display the results in the status console window.
/confirm [text]
This command can be used to display a confirmation prompt to the user before continuing execution. If the user selects Yes then the script will continue, if the user selects No then the script is aborted.
/compare
Executes compare folder content feature using current settings.
/compare and hide
Execute compare folder content feature and forces any matches to be hidden.
/compare and select
Execute compare folder content feature and forces non-matches to be selected.
/copy
This command copies the selected shell items to the clipboard and is local browser specific. Can be used with /paste to complete the operation.
/crc32 "<filename>"
Calculates the CRC32 hash of a local file and returns the result in the status console window.
/cut
This command cuts the selected shell items to the clipboard and is local browser specific. Can be used with /paste to complete the operation.
/delay <seconds>
Delay <seconds> before continuing to the next command or item in the queue.
This can be used to insert a delays between file transfers. For example lets say you need to transfer a file every 30 seconds via a scheduled task but the task scheduler can only run once every minute, you can queue the file multiple times with a delay between each transfer; or maybe you run the task every 5 minutes and queue the file 10 times with a delay between each transfer. It would be more efficient to run the task once every 5 minutes vs every minute.
/delete selected
Insert a delete item operation into the queue.
/deselect
This command will clear the current item selection.
/edit "<filename">
This command opens the selected file using the assigned file association for editing.
/enqueue <command>
Insert any command into the queue transfer.
This can be used to add an operation to the transfer queue where it will be performed if and when the transfer queue is started.
/exec "<full pathname>" "<working dir>" "<parameters>"
Execute a local program or open a file using windows default file association for the file type.
Each parameter is required and must be double-quoted. If you need to wait for the program to close use the /run command
/hide [ -f | -d | -F | -D ] <mask | rx: mask> [modifer]
This command will hide any items matching <mask> can be a wildcard or rx: mask.
Use -d to limit the selection to directories and symbolic links to directories.
Use -f to limit the selection to files and symbolic links to files.
Use -D to limit the selection to directories.
Use -F to limit the selection to files.
/invert
This command will invert the item selection. (This is the same as using Directory > Invert Selection)
/list [flags]
Refreshes the file listing. The flags are optional and apply specifically to FTP servers.
/loadstr <rule set name>
Load a selective transfer rule set by name.
/mark
Add the current item selection to the marked list.
/markedclear
Clear the marked list.
/markedexport
Export marked list to the clipboard.
/markedimport
Import marked list from the clipboard.
/selectinvert
This will invert the item selection.
/markedselect
Select any item that is in the marked list.
/markedtoggle
Add or remove the current selection from the marked list.
/md5 "<filename>"
Calculates the MD5 hash of a local file and returns the result in the status console window.
/mkd "<name of folder>"
Create a folder on the active side. This can create a local or remote folder.
/paste
This command pastes the shell items from the clipboard and is local browser specific. The operation can either be a move, copy, or create shortcut depending on if the items were cut or copied.
/pastelink
This command creates a shortcut linking to the shell items from the clipboard and is local browser specific.
/ren "<old name>" "<new name>"
Rename the old name to the new name. Remember to use double quotes around the parameters.
/require <local | remote>
This command can be used to require a local or remote active browser, if the requirement is not met then the script is aborted. You can use this to prevent accidentally running a script in the remote browser that was written specifically for the local browser.
/run "<full pathname>" "<working dir>" "<parameters>"
Run a local program and wait for the program to close before continuing.
Each parameter is required and must be double-quoted.
/set @#@ %p%f
This command will set a variable for each item selected, for example the variable @1@ will contain the absolute path and filename of first selected item in the list, @2@ will return the second selected item in the list. The selection order is based on the order in which the items appear in the list, not the actual order in which the items are selected.
/set @<text>@ <value>
This command can be used to assign a value to a custom variable named @text@ which can then be used later in a custom command script. This value is preserved between script runs and is cleared when you close FlashFXP.
/set ParseTokens [0 | 1]
This command can turn off (or on) command token parsing until the script finishes or it is turned back on. In some special situations; such as /shell commands it might be necessary to turn off token parsing.
/sha1 "<filename>"
Calculates the SHA-1 hash of a local file and returns the result in the status console window.
/sha256 "<filename>"
Calculates the SHA-256 hash of a local file and returns the result in the status console window.
/sha512 "<filename>"
Calculates the SHA-512 hash of a local file and returns the result in the status console window.
/start
Start the queue.
/stop
Stop the queue. You can include the /stop command within a transfer queue to stop the queue at a specific point. Perhaps you may want to review the remaining queue items before continuing.
/switch
Switch active focus from the current active side to the opposite side; Command with the / prefix are then executed in the context of the now active side.
/switch-activate
Switch active focus from the current active side to the opposite side; Command that follow are then executed in the context of the now active side.
/queue selected [true] [modifier]
Adds the current item selection of the active file list to the end of the queue.
Include the true parameter to bypass the duplicate item check and allow the item to be added to the queue; even if the item already exists in the queue.
Include a <modifier> to modify the target name. The following token modifiers are supported $replace(), $replacerx(), $lowercase(), etc.
/selectall [ -f | -d ]
Select all items in the active side.
Use -d to limit the selection to directories.
Use -f to limit the selection to files.
/select [ -f | -d ] <mask | rx: mask> [modifier]
Clears the current item selection and then select any items matching <mask> can be a wildcard or rx: mask.
Use -d to limit the selection to directories.
Use -f to limit the selection to files.
/andselect [ -f | -d ] <mask | rx: mask> [modifier]
Preserve the current item selection and then select any items matching <mask> can be a wildcard or rx: mask.
Use -d to limit the selection to directories.
Use -f to limit the selection to files.
/selectclear
Clear the current item selection in the active browser.
/shell <command>
This command can be used when connected to a SFTP server to execute commands on the remote server as with a regular terminal client. The command is performed on a dumb terminal which means that you cannot execute commands that require terminal emulation or user input. To do this would require the use of a full featured terminal client.
The server must provide a Unix-like shell and the shell must use the same path syntax as the current SFTP session.
If you need to perform multiple operations in series then the commands must be combined and performed with single /shell command, or add the commands to a shell script stored on the server and then use the /shell command to execute the script, or you can use the following extended syntax below
/shell {
<command 1>
<command 2>
}
Perform multiple shell operations in series. The commands are transformed into a single operation and are the shell equivalent of "<command 1> && <command 2>".
The expected shell behavior of && is that If <command 1> fails or returns an error then <command 2> will not execute.
/abort shell
If you send a command that fails to terminate or end you can issue /abort shell to force the terminal to end.
Alternatively you can press the Abort button located on the tool bar to achieve the same result.
/transfer queue
Start the transfer queue.
/transfer selected
Add current item selection of the active file list to the queue.
If this command is performed as part of an en-queued command then the items will be inserted at the current position in the queue.
/uncd
Changes back to the original path where the custom command was executed undoing any /cd's.
/unhide
This command can be used to restore any items that were hidden by the /hide command.
/unmark
Remove current item selection from the marked list.
/view "<filename">
This command opens the selected file using the assigned file association for viewing.
/writeln "<filename>" <text>
Appends <text> to a local file named <filename>, the line is terminated by CR/LF.
If the file doesn't exist it will be created, otherwise the text is append to the end of the file.
&window <title>
Creates a text window with the results of the commands that follow. The title is optional.