Commands from previous pages operated on files and directories only from current working location. We did not go any deeper into the directory tree. We can get this change by replacing keywords files and directories with recursiveFiles and recursiveDirectories.
Find all files with name data.json or info.json in the entire directory tree. Copy them to the clipboard (the clipboard is flushed before this operation).
We can impose limitation on depth of elements. Look at the code below. Depth 0 means, that certain file or directory lies directly in current working location. For every visited directory, this value is increased by one. For example, 'dir/dir2/name.pdf' has depth 2.
There is a nice and concise Asterisk Pattern that expresses all pdf files from the entire directory tree. It is written in the code below. We can also access the property depth here as well.
Perun2 has two special values: * and **. Single asterisk means all files and directories from current working location without recurrence.
On the other hand, ** means all files and directories from the entire directory tree.