Get filename only (not absolute path) as $1 in shell script.

Is it possible to reference a relative filename only, relative to the directory where rules are being applied, instead of an absolute path and filename?
The reason is that I am matching rules on a folder that is stored on a NAS, and then I am sending a command to the NAS to be executed remotely over SSH, and the absolute path and filename from the machine where Hazel is running is not the same as the absolute path and filename on the NAS.
The rule is executing `cp -Rl $1 path/to/other/dir`. It's recursively hard linking downloaded files (torrents) to a watched dir on the NAS (to be processed) without removing the original files (so they can keep seeding). If $1 was the filename (relative to the dir my rules are applied to) I could just hard code the NAS part of the filename, e.g. `ssh me@nas cp -Rl "/mnt/pool/dataset/Torrents/$s" /mnt/pool/dataset/watchdir
I need to send the command through SSH to execute remotely because OS X doesn't support `cp -Rl`, and also doesn't seem to support hard linking files at all on the non-local volume being shared from my NAS.
The reason is that I am matching rules on a folder that is stored on a NAS, and then I am sending a command to the NAS to be executed remotely over SSH, and the absolute path and filename from the machine where Hazel is running is not the same as the absolute path and filename on the NAS.
The rule is executing `cp -Rl $1 path/to/other/dir`. It's recursively hard linking downloaded files (torrents) to a watched dir on the NAS (to be processed) without removing the original files (so they can keep seeding). If $1 was the filename (relative to the dir my rules are applied to) I could just hard code the NAS part of the filename, e.g. `ssh me@nas cp -Rl "/mnt/pool/dataset/Torrents/$s" /mnt/pool/dataset/watchdir
I need to send the command through SSH to execute remotely because OS X doesn't support `cp -Rl`, and also doesn't seem to support hard linking files at all on the non-local volume being shared from my NAS.