Custom Post Commands Version 2.4.8 20170803 Variable Issue

Looks like there may be a problem in the variables being passed in the latest version. I’m getting the following, which several appear to be in the wrong position or just incorrect now.

This is directly from MCE

BatFileName "E:\VideoCaptures\Cleaned Files\TVTransfer.bat"
VideoOutPut "Zoo Oz is Oz s03 e06 08-03-2017"
VideoInPut "Zoo-S03E06-OzIsOz-62982148-0"
FolderOutPut "E:\VideoCaptures\Cleaned Files"
VideoWidth "1080"
OutputExt ".ts"
FileSize "6"
Month "988.95"
Year "03"
Season “2017”

Everthing after OutputExt is not correct,

This is what it looks like when run manually, which is correct.

BatFileName "E:\VideoCaptures\Cleaned Files\TVTransfer.bat"
VideoOutPut "Zoo Oz is Oz s03 e06 08-03-2017"
VideoInPut "Zoo-S03E06-OzIsOz-62982148-0"
FolderOutPut "E:\VideoCaptures\Cleaned Files"
VideoWidth "1080"
OutputExt ".ts"
FileSize “6” <<<< I thought this should be in MB, not GB’s???
Month "06"
Year "2017"
Season “03”

Have you tried dumping the raw data being passed by MCEBuddy to the custom command into a file. Post that here. The script parsing it may have an issue. Also attach your conversion log.

I think MCEBuddy is passing the file size as 6,988.95 and your script is splitting it up using , as the delimiter. Or your terminal code page is set to a version where the , is replaced by a space. Again look at the raw output from MCEBuddy.

Not home right now so I’ll upload the log tonight, however I don’t know how to dump the raw data. I’m using the same functions in the other thread.

EDIT: This is the .bat that is called in MCE, so it should be completely unmanipulated.


setlocal EnableDelayedExpansion

SET BatFile=“E:\VideoCaptures\Cleaned Files\TVTransfer.bat"
SET OutputFileName=”%~n1"
SET InputFileName="%~n2"
SET FolderOutput="%~3"
SET WideoWidth="%~4"
SET OutputExtension="%~5"
SET OutputFileSize="%~6"
SET OADMonth="%~7"
SET OADDay="%~8"
SET OADYear="%~9"

echo BatFileName %BatFile% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo VideoOutPut %OutputFileName% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo VideoInPut %InputFileName% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo FolderOutPut %FolderOutput% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo VideoWidth %WideoWidth% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo OutputExt %OutputExtension% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo FileSize %OutputFileSize% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo Month %OADMonth% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo Year %OADYear% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo Season %SEASON% >> C:\Users\Wolverine\Desktop\MCEVARS.txt

Call %BatFile% %OutputFileName% %InputFileName% %FolderOutput% %WideoWidth% %OutputExtension% %OutputFileSize% %OADMonth% %OADDay% %OADYear% %SEASON%

Either in the batch file or look at the conversion log it’ll tell you what it’s passing to your batch file.

I suspect this is your issue.

Ok, I’ll check the log because I’m just not understanding what you mean by raw data. The batch file is passing the data coming from MCE to the text file. I’m not touching the variable data in any way before it gets to the text file.

Your script if parsing the arguments and that’s where the problem lies I think (terminal code page issues). See this article on how to get the entire command line and all arguments without processing (or better yet you can find them in the log file, see what MCEbuddy is sending to the command prompt batch file and compare with what your batch file is receiving)

You nailed it, it was indeed the comma in the file size variable. Oh man the comma caused me even more grief then just the entry .bat file. Pretty much ripped my ‘worker’ .bat script apart… 2hrs later I think I have it sorted. Testing now.

That was a great thread, thanks for that. Now I understand just a little bit more.

1 Like