Searching non-indexed folders

Hi all,

I’m trying to create a macro where I need to copy files across some mirrored folders unless a same-named file with a “.lck” extension exists in the same folder I’m trying to copy the file to, in which case I need to delete that file before copying the new file into the folder. One of the issues that I had in the past with Automator was that it wouldn’t find the “.lck” files because they exist on a non-indexed Avid Isis server.

Honestly, I’m not even sure where to start with this. Is this possible, and can someone point me in the right direction of which actions I’d use to find files and the like?

The shell command:

find ~/Documents -name "*.lck"

should list all the .lck files in the ~/Documents folder. Adjust the folder specification for the target folder.

Remember to quote your folder name if it may contain spaces.

A modified version worked great! Much appreciated.