Flylib.com

Books Software

 
 
 

PC Repair and Maintenance: A Practical Guide (Charles River Media Networking/Security) - page 102

 < Day Day Up > 


PATH

Although "path" has a more general meaning, "the path" refers to the path to all of these commands. In 9x, some of these are in the root folder of the boot drive (usually C:\), some are in the Windows folder (usually C:\Windows), and some are in the Command folder (usually C:\Windows\Command). In 2000 and XP, commands can be found in the Windows folder (usually C:\Windows or C:\Winnt), and in the System32 folder (usually C:\Windows\System32). There also might be a Command folder (usually C:\Windows\Command or C:\Winnt\Command). The PATH command sets the computer to recognize the locations of these commands. That is how Windows can find each command simply from the user entering commands at the command prompt or in the Run dialog. Run by itself, PATH displays the current path.

Use

Type PATH followed by the path that contains commands. You can enter multiple command paths by separating them with semicolons (;).

Parameter

;: Separates the different paths that are to make up "the path." If you use this by itself, the existing command path will be deleted.

Example

In 9x, if you find you don't have access to all commands that should be available, type:

PATH C:\;C:\Windows;C:\Windows\Command

You can add any other paths you want, separated by semicolons. This can be especially useful if you boot a 9x machine with a startup (MS-DOS) floppy.



 < Day Day Up > 
 < Day Day Up > 


RECOVER

Recovers readable data from a damaged bad or defective disk.

Use

Type RECOVER followed by the path to the file you want to rescue. RECOVER requires that the disk not be in use, so it cannot be used on the Windows boot partition while the computer is booted to Windows.

Note

  • RECOVER reads a file sector by sector and recovers data from the good sectors. Data in bad sectors is lost. It is common practice to open the file after recovery and attempt to re-enter missing data manually.



 < Day Day Up > 
 < Day Day Up > 


REN or RENAME

Changes the name of a file or folder.

Use

Navigate to the folder that contains the file you want to rename, or to the parent folder of the subfolder you want to rename. Type REN followed by the existing file or folder name, a space, and then the new file or folder name. REN cannot be used to move files or folders, so you cannot enter a new path for the file.

Notes

  • You can use wildcards in either or both the existing and the new filenames, with the caveat that the wildcard characters will stand for the same real characters in both names . For example, let's say that the current folder has three files named test1.doc, test2.doc, and test3.doc. You enter test*.doc as the existing filename and sample*.doc as the new filename. Test1.doc will become sample1.doc, test2.doc will become sample2.doc, and so on.

  • If you try to rename a file to a filename in use in the same folder, you'll get an error message and the renaming operation will not proceed.



 < Day Day Up > 
 < Day Day Up > 


REPLACE

Replaces files in the destination folder with files in the source folder that have the same name . It also can be used to add files to the destination folder that don't already exist there. For example, if you need to make sure that all files on an optical disc have been copied to a folder on the hard drive, you could use another method to copy them again, and then get the prompt to overwrite existing files. Using REPLACE with the /a switch automatically copies only files that don't exist on the destination folder while ignoring those files that do exist there.

Use

To replace files or folders, type REPLACE followed by the path to the source files or folders, then the destination files or folders, followed by any appropriate switches. You can also navigate to the source folder before running the command. If you specify neither a source nor a destination folder, the current folder is used.

Switches

/a: Adds only files to the destination folder that aren't there already; /a cannot be used at the same time as the /s or /u switches.

/p: Prompts you for confirmation before replacing or adding a file or folder.

/r: Replaces read-only, hidden or system files or folders. Files or folders in the destination folder with these attributes normally would cause the operation to stop.

/w: Waits for you to insert a disk before searching for source files or folders. Without this switch, REPLACE attempts to replace or add files immediately after the user presses <ENTER>.

/s: Includes subfolders of the destination folder (not the source folder); /s cannot be used at the same time as the /a switch.

/u: Replaces only those files in the destination folder that are older than those with the same names in the source folder; /u cannot be used at the same time as the /a switch; /u cannot be used to update hidden or system files. You'll have to remove these attributes first, using the ATTRIB command or the Windows interface.



 < Day Day Up >