|
Finding a Lost File
The fist step in locating a lost file is knowing its name. If you want to copy said file and are greeted with the happy File not found error message, you may have mistyped the name. (It happens). Check your typing. Furthermore, you may want to check the directory listing to see if the file is there. Type this command:
C> DIR /P
The slash-P pauses the listing, enabling you to scan each entry.
If the file still doesn't show up, use this command:
C> DIR \WHERE.AMI /S
That's the DIR command, followed by a space, and then a backslash and the filename. In this example, the filename, WHERE.AMI, is used. After the filename comes a space and then slash-S.
By pressing Enter, you tell DOS to search the entire hard drive for the file you've specified. If it's found, you'll see it on the screen as follows:
Directory of C:\LOST\FOUND
WHERE AMI 574 08-01-94 10.04a
1 file(s) 574 bytes
Here DOS has found the lost file in the subdirectory \LOST\FOUND. You then need to use the CD command to move to that subdirectory and from there you can get at the file.
If any additional matching files are found, they're listed as well, along with their directory.
When you find the lost file, consider copying it to the proper location, or use the REN command to rename the file to the name you originally thought you used.
If the list scrolls off the screen, you can tack on the slash-P option. Here's an example:
C> DIR \WHERE.AMI /S /P
Everything else in the command remains the same.
Finding a Lost Subdirectory
A lost subdirectory is a bit harder to find than a lost file, especially when you know that it's somewhere on the drive - but where? As with finding a lost file, the first step is to use the DIR command. Look for the telltale <DIR> in the listing. That shows you all the subdirectories.
If you don't find your subdirectory, you can use the DIR command to search for it. Type in the following
C> DIR \*.* /A:D /S I FIND "MARSPROB"
That's the DIR command, a space, and then a backslash and star-dot-star. That's followed by another space, a slash-A, a colon and D, and then a space and a slash-S. A space follows slash-S, and then the pipe or vertical bar character, another space, the find command, a space, and then the name of the subdirectory you're looking for (MARSPROB in the example). The subdirectory name must be in uppercase (all caps) and have a double quote character (") on either side.
Press Enter and DOS scours the drive, looking for your subdirectory. If it's found, it is displayed as follows:
MARSPROB <DIR> 09-23-92 7:23p
Directory of C:\LOST\MARSPROB
The subdirectory's name comes first - as it would in a directory listing. That's followed by the pathname. To change to that subdirectory, you would type in the pathname following the CD command, in the example, that would be
C> CD \LOSTMARSPROB
If more than one subdirectory appears, you may have to log or change to each one in turn to find the one you're looking for.
There is a chance that this command may not find your subdirectory. In that case, you can use the TREE command to view your hard disk's tree structure.
|