How do I schedule ShowAnalyzer to process a directory?
Home › Forums › Home Theater Computers › How do I schedule ShowAnalyzer to process a directory?
- This topic has 22 replies, 6 voices, and was last updated 13 years ago by tedbone.
-
AuthorPosts
-
May 3, 2011 at 10:21 am #25965
I would like to eliminate the filewatcher and folder watching. I would like to have ShowAnalyzer process a directory each night at a specified time.
Does anyone know how?
May 3, 2011 at 12:27 pm #29912babgvantwrite a bat/cmd file that iterates through all the files in the folder looking for ones w/o artifacts then call showanalyerengine.exe pathtofile.ext
May 4, 2011 at 10:55 am #29916SJMayeHello Andrew,
Thanks. I like your idea. Just a bit above my abilities. With the ShowAnalyzer’s ability to process a directory in the GUI I had hoped there may be the same function addressable thru a command prompt, which then even someone like me could make a scheduled bat file for.
May 4, 2011 at 1:41 pm #29917babgvantThis might be a good starting point.
May 5, 2011 at 10:26 am #29925SJMaye[quote=babgvant]
This might be a good starting point.
[/quote]
Hi Andrew. Thanks for the link. I am open to learn. Would you mind helping me understand since batch files are new to me?
Based on what was written in the link the simple one liner command would be fine by me even if it does not keep track of which files have already been scanned.
for %%f in (“R:Recorded TV*.dvr-ms”) do (if not exist “C:Program FilesDVRMSToolboxCommercialsXml%%~nf.xml” (“C:Program FilesDVRMSToolboxDVRMStoMPEG.exe” /if=”%%f” /of=”%%f” /act=nativecommdetect))
(“R:Recorded TV*.dvr-ms”) – Keep () and “” , change to my path where my recordedtv is stored, and change extension to .wtv for Win7?
“C:Program FilesDVRMSToolboxCommercialsXml%%~nf.xml” – Keep “”, Change path to folder where my XMLs are stored? I setup DVR-MS toolbox with all defaults. My XMLs are stored in the same folder as the recordedtv.
(“C:Program FilesDVRMSToolboxDVRMStoMPEG.exe” /if=”%%f” /of=”%%f” /act=nativecommdetect)) – same, keep (), “”, verfiy path to DVRMStoMPEG
Am I thinking correctly?
May 6, 2011 at 5:57 pm #29936babgvantYes, but the xml files should end up in the %public% folder by default. If they are in the Recorded TV folder SA might not be setup correctly.
May 6, 2011 at 7:43 pm #29937SJMaye[quote=babgvant]
Yes, but the xml files should end up in the %public% folder by default. If they are in the Recorded TV folder SA might not be setup correctly.
[/quote] Yes, you are right. The XMLs were in C:UsersPublicDvrmsToolboxCommercialsXml
Here is my batch file.
for %%f in (“B:Recorded TV*.wtv”) do (if not exist “C:UsersPublicDvrmsToolboxCommercialsXml%%~nf.xml” (“C:Program FilesDVRMSToolboxDVRMStoMPEG.exe” /if=”%%f” /of=”%%f” /act=nativecommdetect))
Wife watching TV. Will test later.
May 10, 2011 at 10:23 am #29957SJMayeTesting did not go well. Something must be wrong. I ran the batch file manually. An DOS window popped up for a millisecond and disappeared. I checked the XML folder and nothing was added. Then got a message that system was running slow. Which I had already noticed. It seemed like whatever I did had it trying to do something, but it was unsuccessful. I ended up rebooting to get things back in order.
I have re-read your link. Decided to go down further and try your more involved solution. Will report back.
May 10, 2011 at 11:54 am #29959skirge01Open up a regular command prompt window and run the batch file from there. This will ensure that the windows stays open and you can see what sort of feedback/errors you get.
May 10, 2011 at 2:13 pm #29964SJMayeHi George,
I sort of did. As stated at the end of my last I moved on to Andrew’s version with more lines of code. I changed the directories to match. I THINK I have them correct, but here is what I get.
First run by double clicking the “commprocess.bat” from the desktop I get this.[IMG]http://i12.photobucket.com/albums/a239/smaye/Capture-9.png[/IMG]
I created a log file named Process_List.log in root drive and no change.
Next I opened a command prompt window and got this . Still has issues. Any clues?
[IMG]http://i12.photobucket.com/albums/a239/smaye/Commprocess.png[/IMG]
May 10, 2011 at 2:55 pm #29967skirge01It looks like a permissions issue. Are you running the CMD prompt as the administrator?
May 10, 2011 at 3:55 pm #29969SJMayeAt that point it was not a administrator command prompt. I ran it again. Still did not process, but I do see a processed_list.log and completed.log on my root drive. They are empty but the update when the batch is run. Thus I think we are closer.
Trying to dissect this the first error could be a syntax thing. The batch file text is below. Note the first command in bold and then compare to what it replied back when run. All I did to this line was to change the extension from *.DVR-MS to *.wtv.
Batch file
@echo off
set recfolder=D:Recorded TV
set logfolder=C::process_recfolder
echo %DATE% %TIME% Starting commercials scan
call :processed_list
for %%f in (“%recfolder%*.wtv”) do (call :scan_comms “%%f”)
if not exist “%logfolder%completed.txt” goto :end
type “%logfolder%completed.txt”
del /q “%logfolder%completed.txt”
call :processed_list
goto :end:scan_comms
find /I %1 “%logfolder%processed_list.log” >nul
if %ERRORLEVEL%==0 goto :eof
“C:Program Files (x86)DVRMSToolboxDVRMStoMPEG.exe” /if=%1 /of=%1 /act=nativecommdetect >nul
echo Completed: %~dpnx1>>”%logfolder%completed.txt”
goto :eof:processed_list
echo PROCESSED FILE LIST>”%logfolder%processed_list.log”
echo %DATE% %TIME%>>”%logfolder%processed_list.log”
for %%f in (“D:Recorded TV*.xml”) do (echo %recfolder%%%~nf.dvr-ms>>”%logfolder%processed_list.log”)
goto :eof:end
echo %DATE% %TIME% Finished commercials scan
goto :eofResponse
[IMG]http://i12.photobucket.com/albums/a239/smaye/Commprocess2.png[/IMG]
May 10, 2011 at 4:17 pm #29970skirge01I’m looking at the results screenshot and noticing that you aren’t running a batch file. It looks like you’re pasting it into the CMD window. Simply put, you can’t do that. Paste the text into a text editor (i.e. notepad… do not use word or wordpad) and save it as commscan.bat to your C: drive and then just type commscan.bat at your C: prompt.
May 10, 2011 at 4:31 pm #29971SJMayeYou are correct. That is what I was doing. As I mentioned above this is all new to me. I moved the batch file to the root drive and am now running it from the command prompt you stated. No errors. Waiting for a result. Will post back.
May 10, 2011 at 4:59 pm #29972skirge01Glad to hear it. That whole DOS thing is like hieroglyphics nowadays. It’s definitely a good thing to be familiar with, though, as you’re finding out. Now, you’ll probably find more uses for it in the future.
-
AuthorPosts
- You must be logged in to reply to this topic.