I would use scripting here instead, if you need to be able to build up multiple custom/complex command lines and variables. (Or just use {allfilepath$} directly instead of storing it in a variable.)
I suspect the @set is removing the quotes or being confused by how many of them are. {allfilepath$} isn't the problem, and should already be adding quotes where they are needed. The problem is probably that there are too many quotes in the string for it to work with @set.
@set is designed for things like @set:x="Test" to work, and wasn't made with multiple quoted strings in mind.
(That said, this is my guess and I've not investigated in detail. I'd always switch to scripting as soon as I started doing something complex like this, as it will save you time in the long run vs trying to do everything with simple commands and @modifiers.)
I don't believe the parser has ever added quotes to codes in @set statements. Including quotes would have made it challenging to remove them in subsequent statements, especially when variables are frequently combined with additional path components.
Quotation marks are stripped by default from values supplied to the evaluator (e.g. allfilepath will not put quotes around any of the file paths). To enable quotes to be added, append #q to the variable name (e.g. allfilepath#q).