Page 1 of 1

embedded file script not working - outside of folder

PostPosted: Thu Nov 25, 2021 6:57 pm
by united
Hi,

Objective:
- run shell script on a command and put results in another folder

Image

shell script
cp $1 $1-2 <-- this works
cp $1 ../$1 < -- this DOENS'T Work (HOW?)

command:
cp <file> <file>-2 <-- works
cp <file> ../<file> <-- works

Question:
- How do I fix the (HOW?) so the file is generated on the directory above or specified.

Troubleshooting which didn't work
- tried cp $1 ~/Desktop/$1
- tried cp $1 /Users/<username>/Desktop/$1

Re: embedded file script not working - outside of folder

PostPosted: Fri Nov 26, 2021 11:22 am
by Mr_Noodle
Does the path have any spaces in it? Also, is there a reason why you aren't using Hazel's Copy action?