Batch File

Batch file is also called as script file or text file that contains series of commands, which could be executed by the command interpreter. Moreover, it may also have constructs such as GOTO, Labels, CALL, IF, etc that enable looping and conditional branching within the batch file.

In earlier days Microsoft Windows was designed to run on MS DOS and in turn to start it the win command was used and could appended to the end of the AUTOEXEC.BAT file to permit automatic execution of Windows. Windows was run from MS-DOS and used COMMAND.COM to run .bat files on the following operating systems:

  • Windows 1, 2 and 3
  • Windows 95 and 98
  • Windows ME (access to real mode MS-DOS was restricted)

Filename extensions

  • .bat: This file extension used by Microsoft for batch files, and executed with MS DOS and all other versions of Windows under cmd.exe, in spite of the unlike ways the two command interpreters execute batch files.
  • .cmd: this extension could use by Windows NT operarting system family and sent to cmd.exe for interpretation. Even it is also used by IBM’s OS/2 for batch file. However, it does not run the system relying on COMMAND.COM so avoids amd.exe scripts from being running in the wrong Windows environment.
  • .btm: This extension used by 4NT and 4DOS. However, the script executes on 4DOS, 4NT are quicker, and the script is loaded completely ready for execution, rather than line-by-line.

Batch File Commands

  • %Digit: Replaceable batch parameters which are defined by the user when the batch is executed. The parameters are separated by spaces, commas, or semicolons, etc
  • %VARIABLE%: Replaces the DOS environment variable name with its environment value.
  • CALL: This command loads and executes a batch file from within a batch file as if it were external command. When a second batch file completes, control is returned to the calling file.
  • ECHO: Controls whether commands and comments within a batch file are displayed
  • FOR: Repeats the operation of a DOS command for each member of a list. Use CALL to execute a batch file as a command
  • IF: Tests a condition and executes a command only if the condition is TRUE. But if the NOT modifier is present, the command will be executed only if the condition is FALSE.
  • REM: Adds remarks to a batch file

Are you not getting any poosible solution on how to recover hard drive after format? If so then follow given link and get the detailed info about it...

Safe and Secure
Safe and Secure