MacOS – How to find hidden items in Automator

applicationsautomatormacbook promacos

I am trying to create a workflow in Automator that will find hidden files in a folder by searching for files with names that begin with ".".
Currently, the Find FInder Items action is as follows:

Find Finder Items
    Search: [(Var:Selection path)]
        [All] of the following are true
            [Name] [begins with] "."

a screenshot of the action

Here is the log showing the error:
action log

It does not receive any input, but outputs to a Move Finder Items action. Every time this action is run, it produces no results. Am I doing this wrong, or is there another way to find hidden files and folders in a variable path? I do not know much about other scripting languages such as applescript, but I am willing to use them if necessary. Thanks for reading!

Best Answer

Use a Run Shell Script action like this:

find "$@" -name .\*