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
The filepath Macro variable needs wrapping in double-quotes as it contains spaces. But as your string is double-quoted, you need double-double-quotes...
filename CDR_Bulk pipe "dir ""&filepath"" /a:-d-h-s /b /s";
Try changing %bquote in your macro to %str().
%Str() works during macro compile time, and should mask the double quote marks.
HTH