hey everyone, is .bat only for windows? i wanna learn how to create a batchfile but i don't know how. Is there a site that you recommend, where i could learn how to create a one? thanks everyone!
Uhh start with some basic commands - open notepad or whatever you wanna use and paste: @echo off color 2b title My test program echo Welcome to my first batch file pause exit There. Save that with the .bat extension and run it. Do some googling to learn new commands NOTE that some people will give you a batch file 'virus' - basically it messes with some registry settings, can end some processes.. use common sense when running batch files you find on the internet
Hmm.. batch files are pretty useless lol. I know how to 'program' them and the only practical application I've found is if I need to open multiple programs/windows at once and only want to lick one icon. You can also use one to shut down your computer. After you to know how to do that, there's not much else to learn.. And like MrHarper said, be careful of those viruses lol they're a real pain when they go deleting system files.
They can be useful. For example, I've got one whenever my net connection goes down because of corrupt dns' I run to fix it, it saves me about 10 lines of code. But they're really only used for low level hackers & sysadmins wanting to automate boring tasks. Back in the days of DOS gaming though, my god they were a godsend!
I disagree with .bat files being useless. I think they are very helpful. I am a system administrator, and when you manage many windows based servers runing multiple tasks .bat, .cmd and .vbs file become extremely helpful. I would advice you to do MrHarper suggested, but when you run them, run them from the command prompt, if not, they will open and close so fast that you will not even see what you did. Play with it, it can become fun. Keep in mind that .bat can become extremly complicated as you move on and start to run very complex tasks, like for example, to run a program at the end of the month, windows schedule tasks does not give you that option, but you can do it with .bat.
You can just put the pause command at the end of the batch file to stop it from opening and closing fast..