Put a time limit on the .BAT

Ok i have two .BAT files. The first one i set up so it ask for a password, if that password is wrong it loops round asking for it again. Once the correct password is entered it triggers the second .BAT which is a variation of the 'Matrix Batch File'.

The 'Matrix Batch File', if your unaware of it, just runs through random numbers at a high speed and look asif the PC is decoding something. This batch file never ends, it just keeps going.

What i want to do is bring it to an end, say after 10 seconds! but i am unsure of how to go about it. Would you be able to help me?

That works well!! However, it stops and says press any button to continue or something, if i could get it to then get rid of all the random numbers and display a message that would be good. Or even if i could just tell it to open a new CMD window with the message displayed in it! That would be very helpful.

Ok i messed around with it a little bit and linked it to a new window to display the message. Below the message it say "please press any key to continue" again, (because i put 'pause' in the coding) but is there anyway to change that to say maybe "please press any key to exit" and then it would close down both CMD windows?

Heres the coding for the CMD window that pops up after the 'Matrix' one comes to a hault!:

You see just above where ive put ">10" in bold, well when ever i run the batch with ">10" just after pause if creates some file on my desktop, do you know what this is? The thing is is that when i leave">10" in the coding it takes away the comment 'please press any button to continue' from the CMD window, which i prefer, but its creating needless files on my desktop!

Somehow i didnt see your post viddywell, thank you though its elimated the problem of creating files on my desktop.

Would you be able to help with the timing please, as i stated in my last post?

also, ive just run it through from the beginning, using the first bat, which asks for you to enter a password, when enter correctly, it runs the matrix bat, which after 10 seconds runs the final bat which shows the code and says press any key to exit. but when you press any key it doesnt exit??? however, if i run the last bat on its own, when you press any key it does exit!!

The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Compnet Ventures, LLC hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.