Results 1 to 9 of 9

Thread: What is a batch file?

  1. #1
    Join Date
    Aug 2008
    Posts
    990

    What is a batch file?

    Hi,
    I don't have a complete idea about a batch file. What is this batch file actually used for? How can i create a batch file?
    Thank you!

  2. #2
    Join Date
    May 2008
    Posts
    26
    First let me tell you what a batch file actually is?
    A batch file is a text file that contains a sequence of commands for a computer operating system. Batch file is usually created for command sequences for which a user has a repeated need. Batch files are lists of command line instructions that are batched together in one file. Batch files do not contain "compiled" code like C++ so they can be opened, copied and edited. Batch files are the backbone of the Windows operating system, delete them and you've effectively disabled the OS.

  3. #3
    Join Date
    Aug 2008
    Posts
    990
    Thanks Sir!
    But how can i make my own batch file?

  4. #4
    Join Date
    May 2008
    Posts
    26

    Creating Batch files

    Creating Batch files

    Simple instructions
    * Open a text editor like notepad(NOT word or wordpad)
    * Type or copy this text:
    @ECHO OFF
    ECHO.
    ECHO This is a batch file
    ECHO.
    PAUSE
    CLS
    EXIT
    * Save this as batchfile.bat, make sure there is no .txt extension after the .bat
    * Double-click the file icon

    This is a little batch file I wrote that I use every day. It deletes the cookies that get dumped to my hard drive every time I go online. I could set my browser preferences not to accept cookies, but sometimes cookies are useful. Some CGI pages are unusable with cookies, sometimes when you enter a password for a Website, the site uses a cookie to remember your password. I just do not need hundreds of cookie files taking up space after I close my browser. With this batch file, all I have to do is double-click it and it deletes my cookies. Feel free to cut and paste this code to your Notepad or Wordpad. Save it as cookiekill.bat on your Desktop.

  5. #5
    Join Date
    Aug 2008
    Posts
    990
    Thanks alot sir this was really helpful information!

  6. #6
    Mannu123 Guest
    Thank you,
    I am also facing this problem and now my problem is solved after reading these comments.
    Thanks Again

  7. #7
    Join Date
    Aug 2008
    Posts
    990
    Thats great !! I am glad that a thread started by me was helpful to somebody else. Great effort by xtract

  8. #8
    Join Date
    Sep 2008
    Posts
    1
    In DOS, OS/2, and Microsoft Windows, a batch file is a text file containing a series of commands intended to be executed by the command interpreter. When a batch file is run, the shell program (usually COMMAND.COM or cmd.exe) reads the file and executes its commands, normally line-by-line. Batch files are useful for running a sequence of executables automatically and are often used by system administrators to automate tedious processes.
    DOS batch files have the filename extension .bat (or .BAT because file names are case insensitive in DOS, Windows and OS/2). Batch files for other environments may have different extensions, e.g. .cmd in Windows NT and OS/2, or .btm in 4DOS and related shells. There is no difference between the .bat and .cmd extensions when the file is directly executed. However, when a shortcut is used to launch them, .bat files run commands using the 16-bit COMMAND.COM command processor whereas if the extension is .cmd, the batch commands are run using the 32-bit Windows NT cmd.exe with all command extensions enabled. Also, the Windows 9x family only recognizes the .bat extension.
    Last edited by Yogesh; 16-09-2008 at 05:01 PM. Reason: External link removed

  9. #9
    Join Date
    Aug 2008
    Posts
    990
    Thanks for your inputs clariss123! That was informative.

Similar Threads

  1. make file name list in excel using batch file
    By shibinpanayi in forum Windows Software
    Replies: 1
    Last Post: 04-06-2011, 03:44 AM
  2. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  3. How can I play a sound file from a Windows batch file?
    By Linoo in forum Operating Systems
    Replies: 4
    Last Post: 27-03-2010, 07:20 PM
  4. Dos batch file to sort files based on file names.
    By Jon Osborn in forum Windows Server Help
    Replies: 9
    Last Post: 17-06-2009, 11:06 AM
  5. Replies: 3
    Last Post: 12-03-2009, 12:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,270,068.43970 seconds with 17 queries