Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch Scripting for disk testing

Status
Not open for further replies.

newBPhoneGuy

Technical User
Dec 12, 2005
204
US
I created a Batch file to test the sh*t out of a disk drive it goes like this

rmdir.....f:
mkdir.....f:*.*
xcopy /e /v /y e:*.* f:*.*
...
...
...
...
something along those lines
now what i want to do is loop ththe script... i think i can use the goto xxxxxx.bat at the end or just xxxxxx.bat but that would loop if forever what i need is the syntax in order to loop a script a certain number of time and i want it to be in the script i dont want to loop it in "scheduled tasks"

any help
thanks in advanced
 
@echo off
FOR /L %%i IN (1,1,10) DO Echo FOO

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
ok thank but where would i places these copmmands in the script @echo at the top and FOR /L %%i IN (1,1,10) DO Echo FOO at the bottom
 
@echo off
FOR /L %%i IN (1,1,10) DO call :DO_SOMETHING
goto :EOF

:DO_SOMETHING
Echo Place your commands here

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
sorry for the confussion so it will go like this

@echo off
FOR /L %%i IN (1,1,10) DO :Do _SOMETHING
goto :EOF
:DO_SOMETHING
Place my script here
 
Yes.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top