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.
After that, click on the Action List with the right mouse button and select "Export" from the context menu. With this, you are able to store the list as file with the file extension FFAL (Faster Files Action List).
Execute Batch Action List
We have now saved an Action List under the name "actionlist.ffal" and we want to execute this list via a batch script. For this, we are creating a text file with the following content:
@echo off
start FasterFiles.exe -cl actionlist.ffal
exit
The most important line is the second line here. In order to control Faster Files via Script, we are passing "-cl" (which stands for "comand line mode") as the first parameter and after that we are passing the path to the Action List in form of an FFAL file. If this file is not located in the same folder as FasterFiles.exe, we have to specify the full path, for example "FasterFiles.exe -cl C:\folder\actionlist.ffal". Alternatively, we can also write -batch instead of the -cl parameter.
If we now click on this batch file, FasterFiles is automatically starting invisible in the background in order to execute the passed Action List.
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".