This article was previously published under Q243067
This article has been archived. It is offered "as is" and will no longer be updated.
The Recovery Console does not provide the ability to edit files. However, you can use the batch command in the Recovery Console to retrieve or alter information from a Windows 2000-based computer. Files such as text (.txt) or log files can be viewed and altered. Retrieving and editing files (such as the Boot.ini file) is possible by creating batch files that will run in the Recovery Console to create a copy of the file and then place it on the floppy drive. The floppy disk containing the copies can then be used on another computer to view and edit the files. For example, in the case of the Boot.ini file, changes can be made to the file and then copied back to the original computer through the Recovery Console.
Because the file is being created instead of copied this is not dependant on the global policy setting that determines whether or not files can be copied to removable media. Administrators should consider setting the global policy to permit the copying of files to floppy disk in the Recovery Console. This article describes how to create batch (.bat) files you can use to view text files in the Recovery Console.
IMPORTANT: The following process should be used for emergency recovery only. Not all file types have been tested with this process. The administrator should enable the appropriate global settings if this type of functionality is required using Q240831. Also, this process is limited to one page of text, anything more than one page will result in a zero byte output file. This due to limitation of the Type command whenrunning in batch mode.
In the following example, a batch file with the following criteria is created:
The batch file will run in the Recovery Console.
The batch file will save a copy of the Boot.ini file named Results.txt on drive A.
To create this batch file:
Create a new text file with any text editor (such as Notepad).
In this new file, type type c:\boot.ini, and press ENTER.
Name the file Tshoot.txt, and then save this file to drive A.
Insert this floppy disk into the computer that is running the Recovery Console.
In the Recovery Console type the following batch command, batch a:\tshoot.txt a:\results.txt, and then press ENTER. This command creates a file named Results.txt that contains the information you requested in the batch file.
Take the floppy disk to another computer to view the Results.txt file.
This can useful for retrieving information about your computer. Information such as the Boot.ini file altering the information and copying the altered file back onto the target computer and making sure that the copy of the file replaces the original Boot.ini file. Listsvc does not work in the batch file. When running a listsvc using the Batch command, listsvc does not display output, so it cannot be redirected to a file. Also, the output from the Type command cannot be piped directly to an output file.
If you type help: for the Batch command, you receive the following information:
Executes commands specified in a text file.
Batch Inputfile [Outputfile]
Inputfile specifies the text file that contains the list of commands to be executed.
Outputfile if specified, contains the output of the specified commands. If not specified, the output is displayed to the screen.
For additional information about the Recovery Console, click the article numbers below to view the articles in the Microsoft Knowledge Base:
229716 Description of the Windows 2000 Recovery Console
240831 How to Copy Files from Recovery Console to Removable Media