Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20-08-2008
Member
 
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!
Reply With Quote
  #2  
Old 20-08-2008
Member
 
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.
Reply With Quote
  #3  
Old 20-08-2008
Member
 
Join Date: Aug 2008
Posts: 990
Thanks Sir!
But how can i make my own batch file?
Reply With Quote
  #4  
Old 20-08-2008
Member
 
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:
Quote:
@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.
Reply With Quote
  #5  
Old 29-08-2008
Member
 
Join Date: Aug 2008
Posts: 990
Thanks alot sir this was really helpful information!
Reply With Quote
  #6  
Old 08-09-2008
Mannu123
 
Posts: n/a
Thank you,
I am also facing this problem and now my problem is solved after reading these comments.
Thanks Again
Reply With Quote
  #7  
Old 08-09-2008
Member
 
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
Reply With Quote
  #8  
Old 16-09-2008
Member
 
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
Reply With Quote
  #9  
Old 29-09-2008
Member
 
Join Date: Aug 2008
Posts: 990
Thanks for your inputs clariss123! That was informative.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is a batch file?"
Thread Thread Starter Forum Replies Last Post
make file name list in excel using batch file shibinpanayi Windows Software 1 04-06-2011 03:44 AM
Windows Batch file to output directory names and size to txt file m2thearkus Software Development 6 16-07-2010 12:04 AM
How can I play a sound file from a Windows batch file? Linoo Operating Systems 4 27-03-2010 07:20 PM
Dos batch file to sort files based on file names. Jon Osborn Windows Server Help 9 17-06-2009 11:06 AM
Batch file to copy a file from the local drive to a computer on lan? dudelearn Tips & Tweaks 3 12-03-2009 12:56 PM


All times are GMT +5.5. The time now is 11:44 PM.