Page 1 of 1

symlinks on subfolders

PostPosted: 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??

Re: symlinks on subfolders

PostPosted: 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.