Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8333829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:09:13+00:00 2026-06-09T03:09:13+00:00

Im trying to make this batch script check on resumption that it has not

  • 0

Im trying to make this batch script check on resumption that it has not processed if a file before and continue with the ones it hasnt. i.e if it has processed a file, skip to the next one. What would I need to make this do such. thanks

@echo off
setlocal enabledelayedexpansion
set EXE_FILE=E:\opencv\build\bin\Release\blobtrack_sample.exe
set INPUT_PATH=E:\Glasgow\Test\
set TRACKS_PATH=E:\Glasgow\Tracks\
set COUNT=0
pushd %INPUT_PATH%
for %%f in (*) do if %%f neq %~nx0 (
  set /a COUNT+=1
  echo Processing %%f, track=%%~nf.txt, btavi=test!COUNT!%%~xf
  %EXE_FILE% fg=FG_0S bd=BD_CC bt=CCMSPF btpp=None bta=Kalman btgen=RawTracks track=%TRACKS_PATH%\%%~nf.txt FGTrainFrames=125 %%f
)
popd
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:09:16+00:00Added an answer on June 9, 2026 at 3:09 am

    You can check whether %OUTPUT_PATH%\%%~nf.avi exists:

    for %%f in (*) do if %%f neq %~nx0 if not exists "%OUTPUT_PATH%\%%~nf.avi" (
      set /a COUNT+=1
      echo Processing %%f, track=%%~nf.txt, btavi=test!COUNT!%%~xf
      %EXE_FILE% fg=FG_0S bd=BD_CC bt=CCMSPF btpp=None bta=Kalman btgen=RawTracks track=%TRACKS_PATH%\%%~nf.txt FGTrainFrames=125 btavi=%OUTPUT_PATH%\%%~nf.avi %%f
    )
    

    But that has a slight problem. If processing breaks for some reasin in the middle of a written file you have half a file that doesn’t get processed again, because you equate existence with completion.

    A more robust way would be to write to a temporary file first and then rename it:

    %EXE_FILE% fg=FG_0S bd=BD_CC bt=CCMSPF btpp=None bta=Kalman btgen=RawTracks track=%TRACKS_PATH%\%%~nf.txt FGTrainFrames=125 btavi=%OUTPUT_PATH%\temp.avi %%f
    ren "%OUTPUT_PATH%\temp.avi" "%%~nf.avi"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a batch file that makes a backup of the USB
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I've been trying to make this script from ClearBox3 to stop conflicting with MooTools
I have been trying to make this to be a little jQuery plugin that
It am trying to launch this code that would normally run from a batch
I'm trying to make a script that will make a copy of a folder
I am trying to make this sample program work (defn foo ([x] (foo x
I'm trying to make this: 174,myfilename.jpg Into this on the php post process page:
I'm trying to make this regex ^(?!\-\-\sRoaming) to match with -- Roaming but it
I'm trying to make this request to the RunKeeper API : GET /user HTTP/1.1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.