PostCustomCommandParameters 在 %destinationpath% 的第一個空格處似乎被截斷了

请求类型:
BUG / 新功能 - Bug

MCEBuddy 版本及类型(32 位或 64 位): - 64

操作系统及类型(32 位或 64 位): - 64

问题或建议概述:
软件似乎会在 %destinationpath% 变量中遇到第一个空格时截断通过 PostCustomCommandParameters 发送的命令。如下日志片段所示。

2019-03-17T04:16:37 MCEBuddy.Transcode.CustomCommand --> Custom command parameters read ->  
PostCustomCommandPath = c:\wmcscript\runshowremoversubdir.bat 
PostCustomCommandParameters = ""%destinationpath%"" 
PostCustomCommandHangPeriod = 0 
PostCustomCommandCritical = False 
PostCustomCommandUISession = False 
PostCustomCommandShowWindow = True 
PostCustomCommandExitCodeCheck = False
2019-03-17T04:16:37 MCEBuddy.Transcode.CustomCommand --> About to run custom command with parameters: 
PostCustomCommandPath = c:\wmcscript\runshowremoversubdir.bat 
PostCustomCommandParameters = ""P:\Recorded TV\Processed\TV\Protected\Rock Legends"" 
PostCustomCommandHangPeriod = 0 
PostCustomCommandCritical = False 
PostCustomCommandUISession = False 
PostCustomCommandShowWindow = True 
PostCustomCommandExitCodeCheck = False
2019-03-17T04:16:37 MCEBuddy.AppWrapper.Base --> Launching process c:\wmcscript\runshowremoversubdir.bat
2019-03-17T04:16:37 MCEBuddy.AppWrapper.Base --> Process arguments ""P:\Recorded TV\Processed\TV\Protected\Rock Legends""
2019-03-17T04:16:37 MCEBuddy.AppWrapper.Base --> UI Session Admin Process : False
2019-03-17T04:16:37 MCEBuddy.AppWrapper.Base --> Setting process priority to Idle
2019-03-17T04:16:37 MCEBuddy.AppWrapper.Base --> c:\wmcscript>echo on 
2019-03-17T04:16:37 MCEBuddy.AppWrapper.Base --> c:\wmcscript>C:\WMCScript\ReadWMCBackup.pl
...
2019-03-17T04:16:38 MCEBuddy.AppWrapper.Base --> c:\wmcscript>C:\WMCScript\ShowRemoverSubDir.pl ""P:\Recorded 
2019-03-17T04:16:38 MCEBuddy.AppWrapper.Base --> Name "main::nothing" used only once: possible typo at C:\WMCScript\ShowRemoverSubDir.pl line 88.

重现步骤:
使用一个包含空格的目标路径作为后置自定义命令。

截图:
我已附上示例日志。

谢谢!

Rock Legends_AXSTV_2019_03_17_03_29_00.wtv-Move Protected TV-2019-03-17T04-15-24.7126063-04-00.log (1.1 MB)

你的 bat 文件是如何使用这个变量的?你在 .bat 文件里也把它放在引号里了吗?

看起来它多了一对引号。你在“PostCustomCommandParameters”条目里做得是对的,所以我怀疑是 bat 文件又额外加了一对引号。

看起來是引號設定的問題。試著少用一組引號,如 @hobesman 所指出,或者如果你想把引號傳給腳本,可以改用跳脫引號 \\\"。這是 Windows/cmd.exe/腳本在系統中解析引號的方式不同所造成的。

成功了。感謝各位的建議。我知道當初(約2013年)設定那個 post-custom-command 時,第二組引號是腳本運作所必需的。我在2018年12月套用的更新,想必讓第二組引號變得不再必要。

再次感謝!