I have the following batch file but I have a problem with it. The IF statements check that a tv program has been recorded. If it has then it runs it through VideoReDo, if it hasn't it will send an email so I can check the recording software.
My problem is that when it runs the email sending .bat file the current batch file stops. It will stop at the first instance and not run any of the other code, even the pause at the end. It just stops (and closes before I can read anything on the screen).
Is there some command that I need to place before the bat file to stop this from happening and ensure that computer returns to the original file?
@echo off
echo Deleting files
del "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsArabicTuesday.mpg"
del "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRAITuesday.mpg"
del "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRTPTuesday.mpg"
del "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRussianTuesday.mpg"
del "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsArabicTuesday.mpg"
del "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsRAITuesday.mpg
del "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsRTPTuesday.mpg
del "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsRussianTuesday.mpg
echo Deleting done
echo Renaming files
rename "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsArabicThursday*.mpg" NewsArabicThursday.mpg
rename "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRAIThursday*.mpg" NewsRAIThursday.mpg
rename "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRTPThursday*.mpg" NewsRTPThursday.mpg
rename "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRussianThursday*.mpg" NewsRussianThursday.mpg
echo Renaming done
echo Start conversion:
IF EXIST "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsArabicThursday.mpg". (
cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsArabicThursday.mpg" "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsArabicThursday.mpg" /t1 /d /q /e
) ELSE (
EmailFileMissing.bat .
)
IF EXIST "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRAIThursday.mpg". (
cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRAIThursday.mpg" "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsRAIThursday.mpg" /t1 /d /q /e
) ELSE (
EmailFileMissing.bat .
)
IF EXIST "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRTPThursday.mpg". (
cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRTPThursday.mpg" "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsRTPThursday.mpg" /t1 /d /q /e
) ELSE (
EmailFileMissing.bat .
)
IF EXIST "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRussianThursday.mpg". (
cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "E:\Staff Media\Private Files\#shared\LRC\gra\Recorded\NewsRussianThursday.mpg" "E:\Staff Media\Private Files\#shared\LRC\gra\Fixed\NewsRussianThursday.mpg" /t1 /d /q /e
) ELSE (
EmailFileMissing.bat .
)
echo All done
pause