files
Description:
The files
dynamic variable is used to generate a list of strings matching files found at a given folder location.
Parent: variable
Value (simple form): string specifying the folder location
Value (key/value form):
folder
: string, required, specifying the folder locationpattern
: string, optional, specifying the file pattern to search forrecursive
: boolean, optional, specifying if the file search is recursive, or single folder depth# simple form
files: (string, required)
# simple example
files: '{folders.music}'
# key/value form
files:
folder: (string, required)
pattern: (string, optional)
recursive: (boolean, optional)
# key/value example
files:
folder: '{folders.music}'
pattern: '*.mp3'
recursive: true
EXAMPLE:
# open any document under folder
variables:
mydocuments:
files: 'c:\users\robc\documents'
commands:
- name: open {mydocuments} document
triggers:
- edit {mydocuments}
execute:
- run: '{mydocuments.value}'
Status: ✅ IMPLEMENTED