I think you need to pass the quotes down to the DOS command (when you invoke the macro) for the path spec to be formatted for Windows. Here's the code snippet I tried:
1 %macro qvwrobocopydir (dir, archive);
2 %let datum = %sysfunc(date(),date7.);
3 filename kopie pipe "robocopy %superq(dir) %superq(archive) *.qvw /MIR /NP";
4 data _null_;
5 infile kopie;
6 input;
7 put _infile_;
8 run;
9 %mend;
10 %qvwrobocopydir("C:\temp\R & D", "C:\temp\backup");
NOTE: The infile KOPIE is:
Unnamed Pipe Access Device,
PROCESS=robocopy "C:\temp\R & D" "C:\temp\backup" *.qvw /MIR /NP,
RECFM=V,LRECL=32767
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Thursday, February 15, 2018 2:43:19 PM
Source : C:\temp\R & D\
Dest : C:\temp\backup\
Files : *.qvw
Options : /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30
------------------------------------------------------------------------------
3 C:\temp\R & D\
New File 14378 test1.qvw
New File 104890 test2.qvw
New File 100536 test3.qvw
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 3 3 0 0 0 0
Bytes : 214.6 k 214.6 k 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Speed : 24422666 Bytes/sec.
Speed : 1397.476 MegaBytes/min.
Ended : Thursday, February 15, 2018 2:43:19 PM
NOTE: 33 records were read from the infile KOPIE.
The minimum record length was 0.
The maximum record length was 81.
NOTE: DATA statement used (Total process time):
real time 0.11 seconds
user cpu time 0.00 seconds
system cpu time 0.01 seconds
memory 1086.53k
OS Memory 9196.00k
Timestamp 02/15/2018 02:43:19 PM
Step Count 1 Switch Count 0
... View more