In many operating systems like Dos, MS windows, a batch file is a text file that is supposed to be containing a series of commands that is to be executed by the command interpreter. When a batch file is run on a system, the shell program (generally "cmd.exe") reads the file and executes its commands, normally line by line.
Batch files are generally used for running a sequence of automated executable commands and are often used by programmers to automate tedious tasks. these files can also be bound with other files (like an image or a sound clip) so that when a user open that file, the batch file which was bound with the file starts running in the background. So this can be used in a situation like suppose you want that your target's computer is restarted everytime he opens a particular image file then you can bind a batch file which executes a series of commands which will restart the target's computer to the image file and now when the target opens the image file, the batch file begins running in the background which will restart the target's computer. For this you can also make 2 batch files, one for opening the image and another for running the restart process, I am telling about this alternative method because combining 2 batch files together is very simple and windows itself provide an inbuilt binder called “iexpress” but it can only combine two batch files.
To use the iexpress, u just need to open it from “run”. After doing so, you will get the picture.
Making Batch files is very simple and requires very less time. To make a batch file all you have to do is to write the instructions, to be executed by the batch file, in a notepad and save it with the extension “.bat”.
Here, as an example, I am giving the instructions for the batch file which you can use to see that how much time has elapsed since you started your computer. Just copy paste the following code in a notepad and save it with extension “.bat” and it will show you the time everytime u runs that file:
@echo.
@systeminfo | @find "System Up Time:"
@echo.
@pause
yar after running it ,it doesn't show the desired result
ReplyDelete