Any good .bat programming tuts out there?
Results 1 to 6 of 6

Thread: Any good .bat programming tuts out there?

  1. #1
    Senior Member br_fusion's Avatar
    Join Date
    Apr 2002
    Posts
    167

    Any good .bat programming tuts out there?

    Any good .bat programming tuts out there? I searched throught the AO forums and really couldn't find anything.

    hey thanks again

    Fusion.

  2. #2
    Banned
    Join Date
    Aug 2001
    Location
    Yes
    Posts
    4,424
    The Tutorials Index... There are at least 3 batch-tutorials in there

  3. #3
    Banned
    Join Date
    Jul 2002
    Posts
    877
    This has been asked dozens of times before and I'll explain agian. Makeing batch files is command scripting not programing mainly because there is no compiling needed. This place might help... www.computerhope.com/msdos.htm and for the *nix www.bsd.org/dos2unix.html

    Just put your commands into filename.bat open the file and watch DOS obey the commands.

  4. #4
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    The_Specialist, I must say that I don't completely agree. Just because there is no compiling needed, it doesn't necessarily follow that it's not programming. For example, BASIC, perl etc are all interpreted languages and are never compiled. That doesn't mean that writing code in them is scripting does it. I do get what you're getting at, because a batch file is just a bunch of commands executed sequentially, but some rudimentary control structures do exist. And IMHO, just because it's a script doesn't mean that it isn't programming. This is a bit off-topic but oh well...
    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  5. #5
    Member
    Join Date
    Mar 2003
    Posts
    74

    Re: Any good .bat programming tuts out there?

    Originally posted here by br_fusion
    Any good .bat programming tuts out there? I searched throught the AO forums and really couldn't find anything.

    hey thanks again

    Fusion.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    "Batch File Programming"
    Level:Starter
    AUTOR: RITESH GAUR


    --------------------------------------------------------------------------------
    1:{)What are batch files?

    --------------------------------------------------------------------------------
    Any file with the extension of .bat
    These file are use to perform number of task one by one,well this is the original idea,infact it was when multitasking was not posible or expensive.
    Old days systems are not well capable to do things as faster than today, you may be sitting in fast processor based computer but those days fast means just a little faster than your sci.caluator.
    Whenever they want to do things they usally create batch file in which they may place commands to perform the task by computer.like u may love to do this
    1dir
    2dir/w
    3dir/s
    see what will happen,if ur system has lots of file than u may impress your girlfriend to inform her that you computer has a virus and u love to see that.
    Well back to the topic those guys commands big jobs once and try to do other small or imp. work.like they may love to created file such as:
    del *.tmp
    del *.bak
    del *.obj
    del *.txt
    copy *.data file to tapedrive
    del *.data
    this second last command will take log time(more than hrs if file is long,usally yes),and they don't want to sit in front of computer to watch whats going on during copy command,and then delete the data files.


    --------------------------------------------------------------------------------
    2:{*)How can I create one?

    --------------------------------------------------------------------------------
    just add few commands and save as.bat
    u may use any textfile editor like notepad(MSWindows)or edit filename.bat(DOS)
    3 :{ Any example?
    dir
    dir/w
    dir/s
    dir/p

    --------------------------------------------------------------------------------
    3:{ How can I use batch file to help me?

    --------------------------------------------------------------------------------
    In number of ways.
    If u ur using DOS,then its the best tool.
    How many times u type Dir?
    How do you delete all temp and BAK file in one shot?
    Answer is batch files.
    If u are not using DO,but using sortware that creates numbers of tmp and/or BAK file(e.g-TC/TC++).
    Answer is same.


    --------------------------------------------------------------------------------
    4:{ I know initial level of batch programming that u explained ,I want more is there any more in Batch programming,in short tell me about serios commands?

    --------------------------------------------------------------------------------
    A) "ECHO"
    @ECHO OFF
    ECHO "THIS TEXT WILL BE DISPLAY ON SCREEN WITHOUT ECHO WORLD"
    ECHO ON
    ECHO "THIS TEXT WILL BE DISPLAY ON SCREEN WITH ECHO WORLD"

    B)"PAUSE"
    @ECHO OFF
    ECHO EXAMPLE OF PAUSE
    ECHO PAUSE STARTED....
    PAUSE DIR DIR/w ECHO .
    ECHO ..
    PAUSE
    PAUSE
    DIR/sx PAUSE
    DIR
    ECHO PAUSE ENDED.
    C)%1,%2,%3,.....
    Try this
    create a file "tstpara.bat"
    @echo off
    echo first parameter u enter is =%1
    echo second parameter u enter is =%2
    ....
    Now,at command prompt run type this
    tatpara hello ritesh
    chech the respose from file and learn:=)


    --------------------------------------------------------------------------------
    AUTHOR: RITESH GAUR.INDIA
    URL:http://riteshgaur.itgo.com


    --------------------------------------------------------------------------------
    webaddress:riteshgaur@yahoo.com

  6. #6
    Member
    Join Date
    Mar 2003
    Posts
    74

    Re: Any good .bat programming tuts out there?

    Originally posted here by br_fusion
    Any good .bat programming tuts out there? I searched throught the AO forums and really couldn't find anything.

    hey thanks again

    Fusion.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    "Batch File Programming"
    Level:Starter
    AUTOR: RITESH GAUR


    --------------------------------------------------------------------------------
    1:{)What are batch files?

    --------------------------------------------------------------------------------
    Any file with the extension of .bat
    These file are use to perform number of task one by one,well this is the original idea,infact it was when multitasking was not posible or expensive.
    Old days systems are not well capable to do things as faster than today, you may be sitting in fast processor based computer but those days fast means just a little faster than your sci.caluator.
    Whenever they want to do things they usally create batch file in which they may place commands to perform the task by computer.like u may love to do this
    1dir
    2dir/w
    3dir/s
    see what will happen,if ur system has lots of file than u may impress your girlfriend to inform her that you computer has a virus and u love to see that.
    Well back to the topic those guys commands big jobs once and try to do other small or imp. work.like they may love to created file such as:
    del *.tmp
    del *.bak
    del *.obj
    del *.txt
    copy *.data file to tapedrive
    del *.data
    this second last command will take log time(more than hrs if file is long,usally yes),and they don't want to sit in front of computer to watch whats going on during copy command,and then delete the data files.


    --------------------------------------------------------------------------------
    2:{*)How can I create one?

    --------------------------------------------------------------------------------
    just add few commands and save as.bat
    u may use any textfile editor like notepad(MSWindows)or edit filename.bat(DOS)
    3 :{ Any example?
    dir
    dir/w
    dir/s
    dir/p

    --------------------------------------------------------------------------------
    3:{ How can I use batch file to help me?

    --------------------------------------------------------------------------------
    In number of ways.
    If u ur using DOS,then its the best tool.
    How many times u type Dir?
    How do you delete all temp and BAK file in one shot?
    Answer is batch files.
    If u are not using DO,but using sortware that creates numbers of tmp and/or BAK file(e.g-TC/TC++).
    Answer is same.


    --------------------------------------------------------------------------------
    4:{ I know initial level of batch programming that u explained ,I want more is there any more in Batch programming,in short tell me about serios commands?

    --------------------------------------------------------------------------------
    A) "ECHO"
    @ECHO OFF
    ECHO "THIS TEXT WILL BE DISPLAY ON SCREEN WITHOUT ECHO WORLD"
    ECHO ON
    ECHO "THIS TEXT WILL BE DISPLAY ON SCREEN WITH ECHO WORLD"

    B)"PAUSE"
    @ECHO OFF
    ECHO EXAMPLE OF PAUSE
    ECHO PAUSE STARTED....
    PAUSE DIR DIR/w ECHO .
    ECHO ..
    PAUSE
    PAUSE
    DIR/sx PAUSE
    DIR
    ECHO PAUSE ENDED.
    C)%1,%2,%3,.....
    Try this
    create a file "tstpara.bat"
    @echo off
    echo first parameter u enter is =%1
    echo second parameter u enter is =%2
    ....
    Now,at command prompt run type this
    tatpara hello ritesh
    chech the respose from file and learn:=)


    --------------------------------------------------------------------------------
    AUTHOR: RITESH GAUR.INDIA
    URL:http://riteshgaur.itgo.com


    --------------------------------------------------------------------------------
    webaddress:riteshgaur@yahoo.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •