I am using the following Macro that uses filename pipe. But get an error saying invalid option name \"dir\", etc. I suspect it could be due to the quotes while defining file
Try changing %bquote in your macro to %str().
%Str() works during macro compile time, and should mask the double quote marks.
HTH