npm:package.json 中的脚本,如何处理空格

GWo*_*ing 4 shell json npm package.json

尝试在 package.json 文件中使其工作

"zip": "C:\\Program Files\\7-Zip\\7z.exe a -tzip -mx9 yes.zip folder\\*"
Run Code Online (Sandbox Code Playgroud)

但它不起作用,因为

'C:\Program\' is not recognized as an internal or external command,
Run Code Online (Sandbox Code Playgroud)

我已经尝试过相同的无效结果

"zip": "C:\\Program\\ Files\\7-Zip\\7z.exe a -tzip -mx9 yes.zip folder\\*"
"zip": "\"C:\\Program Files\\7-Zip\\7z.exe a -tzip -mx9 yes.zip folder\\*\""
"zip": "\"C:\\Program\\ Files\\7-Zip\\7z.exe a -tzip -mx9 yes.zip folder\\*\""
Run Code Online (Sandbox Code Playgroud)

我该怎么做?

谢谢

GWo*_*ing 7

通过在正确位置添加引号来解决

"zip": "C:\\\"Program Files\"\\7-Zip\\7z.exe a -tzip -mx9 yes.zip folder\\*"
Run Code Online (Sandbox Code Playgroud)