Make sure you don't have a space char at the end of the set command. In case you do, %pathA% resolves to C:\xx\kk\ *.doc, instead of C:\xx\kk\*.doc
C:\xx\kk\ *.doc
C:\xx\kk\*.doc