Wissensbasis
Geändert
Run Program Plugin
Howto
This feature is available in the Enterprise Edition of SmartFTP.
Enable Plugin in Global Settings
- Start SmartFTP
- Go to the menu: File - Settings
- The settings dialog opens
- Go to the Transfer - Queue - Plugins dialog
- Select and enable the Run Program plugin the list of plugins
- Click OK to save the changes
Enable Plugin in Favorite Settings
- Go to the Favorite Properties
- Go to the Transfer - Queue - Plugins dialog
- Select and enable the Run Program plugin the list of plugins
- Right-click on the plugin, select Properties
- Click on Action...
- Select the Executable
- Enter the Arguments that are passed to the executable.
- Click OK to save the changes
Examples
If you want to run a batch file (.cmd, .bat) enter the following:
Executable: C:\Windows\System32\cmd.exe
Arguments: /C "c:\path\to\your.cmd" {Operation} {Type} {State}
To run a powershell script:
Executable: C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe
Arguments: -File "c:\path\to\your.ps" {Operation} {Type} {State}
Variables in Arguments
You can use the KB: Transfer Queue Item Variables for the command line arguments.
Example
{Operation} {Type} "{Destination.Path}"
For a copy operation of a file to c:\temp\test.txt, the variables will be replaced as following:
1 1 "C:\temp\test.txt"
The first 1 stands for the {Operation} which is Copy (numeric: 1). The 2nd 1 is for {Type} which is File (numeric 1).
Ähnliche Artikel
What do you think about this topic? Send feedback!