PAK Commands – Choose File/Directory
ChooseFileOrDirectory lets the user choose from the local file system. The command gives an option to choose a file or a directory.
|Both commands can only be used inside the Workflow Executor
typeToChoose input parameter is necessary to start the command. With this you can choose whether a file or directory chooser is opened.
throwOnNoSelection input parameter gives an option to enable or disable the thrown error if no file is selected. By default, this is enabled.
Due to simplicity, the
title input parameter will be left empty for the examples. By default, it is set to „Choose a file“ and „Choose a directory“.
For this we need to select
FILE in the
typeToChoose input field.
The selected file will be written under the key
"C:\\Users\\user\\Downloads\\Workflow Executor Setup (7).exe" in this case.
Sometimes however, you might want to restrict the file types that are shown to the user, this can be done by providing the
fileType parameter. If we for example only want to allow gifs, we can set
["gif"]. Additional file types (e.g. png files) can be added by extending the
fileType input to e.g.