FasterFiles

Script Control of FasterFiles

Using the program version FasterFiles Pro CL, you can not only execute Action Lists via HotKeys and key combinations but also via batch commands - for example out of a script, the command line or out of external applications. On this page, we show how to do that.

Create Batch Action List

First of all, we need an Action List in which the actions are stored that you would like to execute via your script or batch command. For this, you can just create an arbitrary action list in the program as usual or you can just use one of your existing Action Lists that you already have created in FasterFiles.

To execute your existing or newly created action list using a script, you have two different options:

The second option has the advantage that you can use your action list both via the graphical user interface and at the same time via scripts, so that changes to the actions can be carried out centrally and then take effect at all levels at the same time without having to maintain several resources in parallel. The first method, on the other hand, has the advantage that the list becomes independent and can, for example, be passed on more easily or no longer has to exist as a HotKey in FasterFiles in order to still be able to execute it via scripts.

Method A: Execute Action List File directly

Since action lists created in FasterFiles are stored within HotKey files (file extension FFHK, Faster Files Hot Keys), we first need to export our action list from FasterFiles to get it as a standalone file.

To do this, right-click on the desired action list and select "Export" from the context menu. This allows you to save the list as an independent file with the file extension FFAL (Faster Files Action List).

Assume that we have saved an action list under the name "actionlist.ffal" and we would like to call and execute it using a batch script. To do this, we create a text file with the ending BAT and write the following content into it:

@echo off
start FasterFiles.exe -cl actionlist.ffal
exit

The most important line is the second one. To control FasterFiles via a script, we first pass the parameter "-cl" (this stands for "command line mode") and then the path to the action list in the form of our FFAL file. If this file is not in the same directory as the FasterFiles EXE, we have to specify the complete path to the file, such as "FasterFiles.exe -cl C:\Folder\ActionList.ffal". By the way, we can alternatively also write "-batch" instead of the parameter "-cl" with the same effect.

Now when we click on our batch file, FasterFiles will automatically start invisibly in the background and execute the specified list of actions.

Method B: Execute Action List from a HotKey

If you do not want to export your action list and would like to continue to maintain and change it via the FasterFiles graphical user interface (for example because you want to use the same action list via both HotKeys and scripts), you can also execute your action list directly from a HotKey file (file extension FFHK, Faster Files Hot Keys).

To do this, FasterFiles requires three pieces of information: the name of the hotkey and the name of an action list it contains that is to be executed, as well as the FFHK file in which everything is stored. You can find the path to the HotKey file in the information field to the right of the HotKey list after you have clicked on the relevant HotKey in the list. In order not to have to type the path manually, you can also simply copy the path to the clipboard using FasterFiles by right-clicking on the path information.

The HotKey file can be passed simply as such while the other two pieces of information are passed via the parameters "hk" and "al", as the following example call demonstrates:

FasterFiles.exe -cl HotKeys.ffhk hk=HotKey al=ActionList

With this line we execute the action list named "ActionList" associated with the HotKey named "HotKey" and stored within the file "HotKeys.ffhk". The names from our example are of course only named this way to make the example clearer. Of course, in practice, you can also assign any of your own names respectively you can use exactly the names that you already use via the graphical user interface.

Instead of the two individual parameters "hk" and "al", you can alternatively also use the following short form:

FasterFiles.exe -cl HotKeys.ffhk HotKey/ActionList

This line corresponds exactly to the line from our previous example. Instead of specifying the name of the hotkey and the action list using the two individual parameters, here we have used the shorthand notation "HotKeyName/ActionlistName", which also leads to the corresponding action list being executed from the specified hotkey.

Execute multiple Batch Action Lists

By the way, Faster Files is not limited to carry out only one Action List at the same time. If we want to execute multiple Action Lists after each other, we can just pass them as multiple parameters to FasterFiles - for example like that:

FasterFiles.exe -cl actionlist1.ffal actionlist2.ffal

This example first executes all actions that are stored in "actionlist1.ffal" and after that all actions from file "actionlist2.ffal".

Define a Target Directory

A central element when using FasterFiles via the graphical user interface is the target directory. This can, for example, be the folder currently opened in the Explorer, to which an action list can then dynamically refer in any way when you press the assigned hotkey above the open window.

Of course, such an open directory does not exist in the GUI-less world of scripts and command line commands. However, you are nevertheless not forced to define each of your target directories in your action lists in a fixed way.

Instead, also via the script control, you can define any directory as the target directory, which can then be used in exactly the same way as the target directory via the graphical user interface. The desired folder can just easily be set using the parameter "targetdir":

FasterFiles.exe -cl actionlist.ffal targetdir=C:\Folder

Here we define the folder "C:\Folder" as the target directory and we execute the action list "actionlist.ffal". Any reference within this action list to the "target directory" is therefore set to the folder "C:\Folder". 

In the action lists you can then do everything with this defined target directory that the FasterFiles actions allow - just like you know from the user interface: you can open, copy, delete, print or move files or folders from this directory, you can create files or folders in this directory, use the directory as a storage location for your downloads and so on. And this dynamically for any directory without having to change or adapt the action list itself.

Show or Hide Error Messages

You can use the parameter "errmsg" to determine whether or not error messages (for example, about undefined parameters or references to missing files or folders) should be displayed during the execution of an action list via the script control. With "errmsg=1" the error messages are displayed, with "errmsg=0" the error messages are suppressed. If you do not specify this parameter, "1" is used as the default value and error messages are output accordingly.

FasterFiles.exe -cl actionlist.ffal errmsg=0

In this example, we execute the action list stored in the file "actionlist.ffal" and we suppress any error messages that may occur during execution by using the parameter "errmsg=0".