symlinks on subfolders

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

symlinks on subfolders Fri Aug 28, 2015 3:17 pm • by mendel
Hi,

My basic problem is this: I have hazel monitoring a group of folders and subfolders and whenever I create a new folder named 'paper' I want hazel to create a symlink to it somewhere else. I'm using the shell script feature instead of simply 'make alias' because many programs don't read aliases properly but do ready do read symlinks. The shell script I'm using is:

ln -s $1 /path/to/symlink

According to hazel $1 is supposed to refer to the file being processed. However every time I try it, I get an error processing the shell script. What am I doing wrong??
mendel
 
Posts: 5
Joined: Fri Aug 28, 2015 3:13 pm

Re: symlinks on subfolders Mon Aug 31, 2015 11:34 am • by Mr_Noodle
Does the path have spaces in it? If so, you'll need to quote the argument like:
Code: Select all
ln -s "$1" /path/to/symlink

Otherwise, if it's something else, turn on debug mode (see sticky article) and post the script output/error.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron