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!
Printable View
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!
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.
Thanks Sir!
But how can i make my own batch file?
Creating Batch files
Simple instructions
* Open a text editor like notepad(NOT word or wordpad)
* Type or copy this text:
* Save this as batchfile.bat, make sure there is no .txt extension after the .batQuote:
@ECHO OFF
ECHO.
ECHO This is a batch file
ECHO.
PAUSE
CLS
EXIT
* 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.
Thanks alot sir this was really helpful information!
Thank you,
I am also facing this problem and now my problem is solved after reading these comments.
Thanks Again
Thats great !! I am glad that a thread started by me was helpful to somebody else. Great effort by xtract :notworthy
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.
Thanks for your inputs clariss123! That was informative.