johnsonx42 Wrote:perhaps if you post your postprocessing.bat we could see where things are going wrong?
@echo off
REM make sure the file passed actually exists
if not exist "%~f1" goto error
set DBPath=C:\Users\Public\NPVR\npvr.db3
set NSHelper="C:\Program Files (x86)\NPVR\NScriptHelper.exe"
set subtitle=
set title=
echo Getting recording title
FOR /F "tokens=*" %%i in ('%NSHelper% -title "%~f1"') do SET title=%%i
echo Getting recording subtitle
FOR /F "tokens=*" %%i in ('%NSHelper% -subtitle "%~f1"') do SET subtitle=%%i
REM Make sure the variables aren't empty
if "%title%" == "" goto error
if "%subtitle%" == "" goto nosubtitle
Echo removing illegal characters from the variables
echo original: %title%
set title=%title:?=-%
echo %title%
set title=%title:/=-%
echo %title%
set title=%title:\=-%
echo %title%
set title=%title::=-%
echo %title%
echo original: %subtitle%
set subtitle=%subtitle:?=-%
echo %subtitle%
set subtitle=%subtitle:/=-%
echo %subtitle%
set subtitle=%subtitle:\=-%
echo %subtitle%
set subtitle=%subtitle::=-%
echo %subtitle%
REM Create new filename
SET newfile="%~dp1%title% - %subtitle%%~x1"
echo New filename is: %newfile%
echo Checking that the new filename is not the same as the old
if "%~f1" == %newfile% goto error
REM Check if file exists and change filename if it does
set Qnum=1
:CheckFile
if not exist %newfile% goto renamefile
if %Qnum%==10 goto error
set /a Qnum=%Qnum%+1
SET newfile="%~dp1%title% - %subtitle% (%Qnum%)%~x1"
echo checking %newfile%
goto checkfile
:nosubtitle
Echo There was a title, but no subtitle
SET newfile="%~f1"
Echo replacing underscores so I know this has been processed
set newfile=%newfile:_= - %
:renamefile
echo Checking that the new filename is not the same as the old
if "%~f1" == %newfile% goto error
echo renaming the file to %newfile%
move /y "%~f1" %newfile%
echo checking the rename worked and updating the database if so
if exist %newfile% %NSHelper% -rename "%~f1" %newfile%
goto end
:error
Echo Error! Check above...
:end
echo Finished.
EDIT: I put in a "pause" right before the ":end" to see what was happening, and got a command pop-up window with the message "Error! Check above...". So it seems to be running, but something is wrong.