Batch File Restart for Multiple Bots
The way I've seen most people doing this is making a separate .bat for each bot. But there is a better way! With this code you will be able to run multiple bots on a single .bat file placed anywhere on your computer.
YourBot.exe is the .exe you want to run (duh). "C:\Users\Username\Desktop\Bot1\Release" is just the file which the .exe you click to run your program, and "C:\Users\Username\Desktop\Bot1\Release\YourBot.ex e" is the same as the previous file path except with the .exe you want to run on the end of it. You can just paste as many
as you want before "timeout /t 1700 >null". Here's an example with 6 instances of NecroBot.
Code:
@EcHo off :loop taskkill /f /im "YourBot.exe" >nul timeout /t 10 >null cd /d "C:\Users\Username\Desktop\Bot1\Release" start "" "C:\Users\Username\Desktop\Bot1\Release\YourBot.exe" timeout /t 2 >null cd /d "C:\Users\Username\Desktop\Bot2\Release" start "" "C:\Users\Username\Desktop\Bot2\Release\YourBot.exe" timeout /t 2 >null timeout /t 1700 >null goto loop
Code:
cd /d "C:\Users\Username\Desktop\Bot1\Release" start "" "C:\Users\Username\Desktop\Bot1\Release\YourBot.exe" timeout /t 2 >null
Spoiler
[CODE @EcHo off
:loop
taskkill /f /im "NecroBot.exe" >nul
timeout /t 10 >null
cd /d "C:\Users\Hunter\Desktop\Necro_41628\Release"
start "" "C:\Users\Hunter\Desktop\Necro_41628\Release\Necro Bot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_213122\Release"
start "" "C:\Users\Hunter\Desktop\Necro_213122\Release\Necr oBot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_313444\Release"
start "" "C:\Users\Hunter\Desktop\Necro_313444\Release\Necr oBot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_313299\Release"
start "" "C:\Users\Hunter\Desktop\Necro_313299\Release\Necr oBot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Documents\Release"
start "" "C:\Users\Hunter\Documents\Release\NecroBot.ex e"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_ejh3141\Release "
start "" "C:\Users\Hunter\Desktop\Necro_ejh3141\Release\Nec roBot.exe"
timeout /t 1700 >null
goto loop[/CODE]
:loop
taskkill /f /im "NecroBot.exe" >nul
timeout /t 10 >null
cd /d "C:\Users\Hunter\Desktop\Necro_41628\Release"
start "" "C:\Users\Hunter\Desktop\Necro_41628\Release\Necro Bot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_213122\Release"
start "" "C:\Users\Hunter\Desktop\Necro_213122\Release\Necr oBot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_313444\Release"
start "" "C:\Users\Hunter\Desktop\Necro_313444\Release\Necr oBot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_313299\Release"
start "" "C:\Users\Hunter\Desktop\Necro_313299\Release\Necr oBot.exe"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Documents\Release"
start "" "C:\Users\Hunter\Documents\Release\NecroBot.ex e"
timeout /t 2 >null
cd /d "C:\Users\Hunter\Desktop\Necro_ejh3141\Release "
start "" "C:\Users\Hunter\Desktop\Necro_ejh3141\Release\Nec roBot.exe"
timeout /t 1700 >null
goto loop[/CODE]
