How do I schedule ShowAnalyzer to process a directory?

Home Forums Home Theater Computers How do I schedule ShowAnalyzer to process a directory?

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #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?

    #29912
    babgvant

      write 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

      #29916
      SJMaye

        Hello 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.

         

        #29917
        babgvant

          This might be a good starting point.

          #29925
          SJMaye

            [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?

             

             

             

             

             

             

             

             

             

             

             

            #29936
            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.

              #29937
              SJMaye

                [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.

                #29957
                SJMaye

                  Testing 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.

                   

                  #29959
                  skirge01

                    Open 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.

                    #29964
                    SJMaye

                      Hi 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]

                       

                      #29967
                      skirge01

                        It looks like a permissions issue.  Are you running the CMD prompt as the administrator?

                        #29969
                        SJMaye

                          At 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 :eof

                          Response

                          [IMG]http://i12.photobucket.com/albums/a239/smaye/Commprocess2.png[/IMG]

                           

                           

                          #29970
                          skirge01

                            I’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.

                            #29971
                            SJMaye

                              You 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.

                              #29972
                              skirge01

                                Glad 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.

                              Viewing 15 posts - 1 through 15 (of 23 total)
                              • You must be logged in to reply to this topic.