Saved Bookmarks
| 1. |
Solve : How to make batch file do a random choice?? |
|
Answer» HEY, I'm trying to make a batch file that can randomly choose between TWO scripts. For example, the first option can be 'echo you win', and the second can be 'echo you lose'. Is it possible for the batch file to randomly choose on of them? Thanks, Whitebeard1See if this is the SORT of thing you need. Code: [Select]echo off :loop set /a num=%random% %% 2 if %num% equ 0 (echo you win) else (echo you lose) pause goto :loop Thanks a BUNCH! Exactly what I need. |
|