Reputation: 49
set T=0
ECHO OFF
title loop script - close to stop loop
:ping
IF %T%==3000 (
ECHO ON
ECHO Loop complete... repeat.
ECHO OFF
set T=0
start "%0\..\attack\dos.bat" <----- Not working....
) ELSE (
SET /A T = %T% + 1
)
goto ping
If you wonder, this is a Loop script which performs an Action every 3 seconds.
My Problem: the "start" command which starts the dos.bat does not work. It opens a new command window called "dos.bat" but its empty and the code in the dos.bat is not running.
What am I doing wrong?
Upvotes: 0
Views: 685
Reputation: 49097
Command start
interprets first double quoted parameter as title for the new command prompt window. I don't really understand why you use command start
and not command call
, but here is your batch code in a manner which should work.
@echo off
set "T=0"
title loop script - close to stop loop
:ping
if %T%==3000 (
echo on
echo Loop complete... repeat.
echo off
set "T=0"
start "My bad script attacking websites!" "%~dp0..\attack\dos.bat"
) else (
set /A T+=1
)
goto ping
Upvotes: 1