2012-03-20, 03:52 AM
I'm running into this problem with ImageGrabLite, but since it's not so much a problem with the plug-in but the circumstances, I thought I'd post here for more general assistance. If I have erred, please accept my apologies and move to the appropriate area.
A while back, during the renaming phase of ImageGrabLite, I had an error with the rename because the file was in use("The process cannot access the file because it is being used by another process"). I figured comskip still had the file open (being run in parallel), so I put some coding in my batch file to wait if the comfix files weren't available, and I thought that took care of it. But recently I've had the problem pop up again, and then twice tonight. After I saw the first one, I added the following code to my batch, but it happened a second time tonight after the change:
So, anyone have an idea why the file might be otherwise in use? I can think of nothing outside the NPVR universe that should be messing with the file, and it seems that this should catch if it is open there (okay, I stole it from someone else's batch file I found here).
Thanks.
A while back, during the renaming phase of ImageGrabLite, I had an error with the rename because the file was in use("The process cannot access the file because it is being used by another process"). I figured comskip still had the file open (being run in parallel), so I put some coding in my batch file to wait if the comfix files weren't available, and I thought that took care of it. But recently I've had the problem pop up again, and then twice tonight. After I saw the first one, I added the following code to my batch, but it happened a second time tonight after the change:
Code:
REM try renaming the file to the same name, see if gets an error
:checkopen
ren %1 "%~nx1"
if errorlevel 1 goto waitandcheck
goto grab
:waitandcheck
REM if we got here, the rename failed so wait a bit and try again
ping 1.1.1.1
goto checkopen
:grab
So, anyone have an idea why the file might be otherwise in use? I can think of nothing outside the NPVR universe that should be messing with the file, and it seems that this should catch if it is open there (okay, I stole it from someone else's batch file I found here).
Thanks.