Automator SCRIPT NEED: Select part of name file, find file with containing name, then copy this in item in another folder I have 3 folder:

JPG folder: contains my modified JPG files, the name of file is (examples): DSC02996 20181027 201438 (LR).jpg

RAW folder: contains my RAW files, the name of file is (examples): DSC02996.RAW

DESTINATION folder: i want to copy here my RAW file.

I need a script that looks for the beginning of the name in the JPG folder, then looks for the file in the RAW folder and copies the result to the DESTINATION folder. 

It's possible?

Thanks in advance.
Guido
Open Automator, create a new Service and mount your workflow like this:



Save it and name as CopyRaw or something you like.

Shell Script:

awk '{print $1}' &lt;&lt;&lt; "${1##*/}"

Usage:

Righ click the file you want and click on your service CopyRaw.