Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi
i need help configuring batch file that asks the user to input a number 1-1000 and than perform a specific command the number of times that the user chose.

@echo off & setLocal EnableDELAYedExpansion
set /p N=how many ?
for /L %%a in (1 1 !N!) do (
echo do %%a
)
=====================================
Helping others achieve escape felicityM2

hi.
thank you for your response,
i have ran this:
@echo off & setLocal EnableDELAYedExpansionset /p N=how many ?
ping x.x.x.x
for /L %%a in (1 1 !N!) do (
echo do %%a
)
it seems that it runs ping command only once and at the end i see:
do 1
do 2
do 3..10

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |