(.bat) batchfile i wanna learn, help please!

Discussion in 'Bing' started by akanesakura, Oct 30, 2008.

  1. #1
    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!
     
    akanesakura, Oct 30, 2008 IP
  2. MrHarper

    MrHarper Guest

    Messages:
    698
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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 ;)
     
    MrHarper, Oct 30, 2008 IP
  3. pmcross

    pmcross Peon

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    pmcross, Oct 31, 2008 IP
  4. tr1x

    tr1x Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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.
     
    tr1x, Oct 31, 2008 IP
  5. livesol

    livesol Peon

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Quick question, why are you interested in learning to do this?
     
    livesol, Oct 31, 2008 IP
  6. livesol

    livesol Peon

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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! :)
     
    livesol, Oct 31, 2008 IP
  7. coloriteman

    coloriteman Peon

    Messages:
    669
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Type commands on notepad and save the file with extension .bat
     
    coloriteman, Nov 5, 2008 IP
  8. edu23more

    edu23more Active Member

    Messages:
    78
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    65
    #8
    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.
     
    edu23more, Nov 6, 2008 IP
  9. MrHarper

    MrHarper Guest

    Messages:
    698
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You can just put the pause command at the end of the batch file to stop it from opening and closing fast..
     
    MrHarper, Nov 6, 2008 IP
  10. edu23more

    edu23more Active Member

    Messages:
    78
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    65
    #10
    That is correct MrHarper, I agree. I just like to work straight from command prompt.
     
    edu23more, Nov 6, 2008 IP