PostCustomCommandParameters lijken af te kappen bij de eerste spatie in %destinationpath%

Request Type:
BUG / NEW FEATURE - Bug

MCEBuddy Version and Type (32bit or 64bit): - 64

Operating System and Type (32bit or 64bit): - 64

Summary of the problem or suggestion: It seems like the the software is truncating the command sent via the PostCustomCommandParameters at the first space in the %destinationpath% variable. This is shown in the following excerpt from the log.

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.

Steps to replicate the bug: Use a post custom command with a destinationpath that contains spaces.

Screenshots: I have attached an example log.

Thanks!

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)

How does your bat file use the variable? Did you put it in quotes in the .bat file as well?

It looks like it’s seeing one-too-many sets of quotation marks. It looks like you did it correctly in the “PostCustomCommandParameters” entry, so I’m wondering if the bat file is adding an additional set.

It looks like an issue with the quotes setup. Try using one less set of quotes as @hobesman pointed out or try escaping your quotes \" if you want to pass the quotes to your script. It’s windows/cmd.exe/scripting which is interpreting the quotes differently as it navigates through the system.

That worked. Thank you guys for the advice. I know that when I set up that post-custom-command in the first place (~2013) the second quote was required for the script to work. The update that I applied in December 2018 must have made the second quote unnecessary.

Thanks again!