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 7678017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:32:58+00:00 2026-05-31T17:32:58+00:00

I wish to execute a batch file and have it call itself 10 times.

  • 0

I wish to execute a batch file and have it call itself 10 times.

set /a iteration=0%1+1
IF %iteration% EQU 10 exit
rem Taskkill /IM aspnet_compiler.exe /F
timeout 1
call KillBILLd.bat %iteration%

However, it will only get to the number 8 before erroring with

Invalid number.  Numeric constants are either decimal (17), hexadecimal (0x11), 
or octal (021).

on line

set /a iteration=0%1+1

How can I fix this error?

  • 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-05-31T17:32:59+00:00Added an answer on May 31, 2026 at 5:32 pm

    You’ve got 0%1 in that expression – if your argument is 8, that expands to 08, which isn’t a valid octal number (8 is not an octal digit), and so you get that error. I’m not a batch file expert, but I guess you want to leave off the leading 0:

    set /a iteration=%1+1
    

    Here’s a link to some SET command documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a method send() that I wish to execute/call every 1 second. I'm
Given that you have found a process that you wish to execute a function
ALTER DATABASE test SET ENABLE_BROKER this is the sql query i wish to execute
I have a Java swing code, I wish to execute this code via Ant.
When I execute the following code #!/bin/sh # \ exec wish $0 ${1+$@} set
I have an app with 2 tabbed view, I wish to execute some code
I have a SQLite database that I wish to read records from and execute
I have a maven project built in '/some/where' which I wish to run/execute from
I wish to execute a javascript function after asp.net postback with out using ajax.
I wish to perform an experiment many different times. After every trial, I am

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.