Jan-10-2023, 11:42 PM
I updated that section of the code so that I would at least get error codes, and using a different mechanism to run the commands.
def MoveFile(pFile, pDest): isFile = os.path.isfile(pFile) if isFile == True: dPath=os.path.dirname(pDest) isDir = os.path.isdir(dPath) if isDir == False: CreateFolder(dPath) os.system('move "%s" "%s"' % (pFile, pDest)) #shutil.move(pFile, pDest) WriteLog("Moved: '%s' to '%s'" % (pFile, pDest)) if right(pDest, 3) == "mpg": time.sleep(5) #BEGIN CCEXTRATOR ccCmnd = [ccPath, "-delay", "0", pDest] WriteLog ("BEGIN: Closed Captions Extraction on %s: %s" % (pDest, ccCmnd)) ccErrCode = subprocess.run(ccCmnd) if str(ccErrCode.returncode) == "0": WriteLog ("SUCCESS!! - Closed Captions") else: WriteLog ("ERROR!! - Closed Captions failed with the following: %s" % ccErrCode) #END CCEXTRATOR #COMSKIP WriteLog ("BEGIN: Comskip on %s" % pDest) csErrCode = subprocess.run([csPath, "--ini=" + BasePath + "Comskip/comskip.ini", pDest]) if str(csErrCode.returncode) == "0" or str(csErrCode.returncode) == "1": WriteLog ("SUCCESS!! - Comskip") else: WriteLog ("ERROR!! - Comskip failed with the following: %s." % str(csErrCode)) #END COMSKIP else: WriteLog("Info: '%s' is not a file, so won't be moved." % pDest)