More on the command line


Last month's column included a primer on using Windows NT's Command Prompt to perform tasks faster and more easily. Here are a few more command-line tricks you'll want to add to your bag:

Find files based on content. Sure, you can find any file containing the word aardvark by choosing Start-Find-Files or Folders, entering aardvark in the "Containing text" field, and clicking Find Now. But the findstr command also provides output options that the graphical user interface doesn't (type findstr /? on the command line for help). One of findstr's best options is redirecting the results of a search to a text file. For example, if you enter the command findstr /s /i /m "aardvark" *.txt >aardvark.txt, you'll not only search the current directories and its subdirectories for .txt files that mention the marsupial, but you'll also save the results in the file aardvark.txt.

Create a repair disk. Whenever you make changes to Windows NT's configuration, you should create an updated emergency repair disk. Then, if NT ever becomes unbootable, you can use the disk to boot and repair the OS. Enter rdisk at the command prompt, then click Create Repair Disk and follow the prompts.

Edit that ASCII. Notepad works fine, but getting to the point where you can see and edit the file requires navigation. To open a file instantly for editing, type edit filename. To open the file in a separate window (leaving the command line ready for more action), enter start edit filename. Note: If the file doesn't reside in the current directory, you need to specify the full path to the file before entering the file name.

Read this. Though designed for system administrators, Eric Pearce's Windows NT in a Nutshell has a lengthy chapter on using the command line, plus gobs of tips for troubleshooting and tweaking networks, user accounts, and file permissions.

- Scott Spanbauer

Windows NT in a Nutshell

$49.95; O'Reilly & Associates; www.woodslane.com.au


Category:Windows NT
Issue: February 2000

These Web pages are produced by Australian PC World © 1999 IDG Communications