How can I append wildcards to a variable?
Making a little automator app that takes input from a dragged file and I want to then copy other files in a standard directory structure related to the original file.
The problem here is the *_denoised.*
I'm trying to copy any file named *_denoised.* into another folder, but just tacking on the wildcard string to the variable is obviously not the way to do this.
for f in "$@"
do
DNOIS=`printf "$f" | cut -d'/' -f-6`/Media/Plates/*_denoised.*
# *** the cut works perfectly, just not the wildcard extension
mkdir -p /Volumes/TMMC3/Staging/To\ Remote\ Tracking/$SHTNM/{Media,Project\ Files}
cp $DNOIS /Volumes/TMMC3/Staging/To\ Remote\ Tracking/Media
# *** this cp fails due to the bad file path
Any help would be greatly appreciated.