How to open a file given its pathname relative to the current batch script
Subject: How to open a file given its pathname relative to the current batch script
From: Robert Dodier
Date: Tue, 24 Nov 2009 14:41:13 -0700
On Tue, Nov 24, 2009 at 12:17 PM, Manuel Fiorelli
<manuel.fiorelli at gmail.com> wrote:
> I'd like to define a function which generates relative pathnames using
> pathname_merge.
>
> :lisp (defun $relative_filename ($name) (namestring
> #$filename_merge(extract_filename(x),name)$));
>
> Unfortunately, the argument "name" of filename_merge isn't bound to
> the parameter name of the function "relative_filename"
Probably there's some unintended effect of the #$ macro here.
I think it's more predictable to just stay in Lisp, e.g.:
(defun $relative_filename (name) (namestring ($filename_merge
($extract_filename $x) name)))
... although I guess I don't see a need for relative_filename;
it seems like filename_merge + extract_filename is enough.
best
Robert Dodier