The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


HPFS-UD - Undelete files on HPFS drives

Summary

HPFS-UD allows you to undelete files from HPFS drives, or to recover valid files located on damaged HPFS drives.

Icon

Command Line Format

Usage: HPFS-UD {Switches} <Drive Spec(s)>

Switches

-c
Complete disk scan.
-d
Damaged partition mode.
-f
Keep a log file.
-l
Lock the drive.
-p
Prompt for restore path.
-s
Subdirectories are created.
-z
Full surface scan for root dir FNode.
-on
Run on Machine Name.

Description

Note : For a complete discussion on the terms and concepts presented here, please consult Appendix G - HPFS Internals.

HPFS-UD scans the disk for deleted FNodes, validates them and then builds up a list to enable you to select the files which you wish to recover.

HPFS-UD when undeleting files has two modes of operation: quick scan mode (the default) and complete disk scan. If HPFS-UD is running in quick scan mode when it starts up you will see the following dialog box:

It then will begin to scan the disk. As HPFS-UD is scanning the disk, in either quick or complete scan modes, you will see a dialog box similar to:

When HPFS-UD has finished scanning the disk you will either see a dialog box informing you that there were no deleted files found, or a window similar to:

HPFS-UD allows you to select multiple files for recovery in one operation. The Enter key undeletes the currently selected file and Control-Enter allows you to undelete all tagged files. An individual file is tagged using the space bar.

The FNode contains only the first fifteen characters of the filename and the length of the real filename. Any filename that was greater than fifteen characters long will have a '*' character added to the end of the filename.

If you have turned prompting on, or the file to restore already exists, or the filename contains invalid characters, you will be prompted to edit it with a dialog box similar to the following:

As the files are being recovered you will be informed as to which file is currently being recovered.

-c Complete disk scan

The default mode for HPFS-UD is to only scan the deleted and unused file areas - thus making it considerably faster than other HPFS undelete programs. However, there are certain circumstances where you will wish to scan the complete disk. This would happen when the following situation has occurred: Under OS/2 a file can be allocated a length when it is created. Although all of this file may not have been written, it is still marked as owned, and thus not searched by the normal quick scan. There may be deleted files in this space. It is rare that you would wish to use this switch.

-d Damaged partition mode

Under certain circumstances your HPFS partition may become unusable. If you have either run FDISK with unexpected results (you have lost one of your partitions) or it has just become corrupted (through whatever means) and FDISK reports the partition as UNFORMATTED, use this switch. It changes the operation of HPFS-UD to recover valid files from the lost partition.

The first thing which HPFS-UD does is to scan for the root directory FNode. If the root directory FNode is found, then path information can be returned. If it is not, then only the base file name (the first fifteen characters) can be returned. HPFS-UD will then proceed to scan the entire disk and search for good (not deleted) files.

See also the -z switch.

-f Keep a log file

This switch instructs HPFS-UD to maintain a log file of all of its operations and of what ever it finds. It also lists the reasons for which a deleted FNode may have been rejected and thus not added to the list.

The log file is named HPFSUD-Drive Letter.LOG. It is created in the directory from which HPFS-UD was started.

-l Lock the drive

This switch attempts to lock the drive so that other processes can not access the drive whilst HPFS-UD is accessing the drive. This is to ensure that no other processes inadvertently overwrite the files which you are trying to recover.

-p Prompt for restore path

By default, the files of the given path are automatically written to the disk. This switch turns on prompting. You will be prompted to edit the complete path and filename of the files as they are being restored.

-s Subdirectories are created

By default, all path information is removed from the filename. This switch turns on subdirectory processing. It leaves the subdirectories intact.

-z Full surface scan for root dir FNode

This switch can only be used in conjunction with the -d switch. By default, the -d switch scans the middle 40% of the disk to find the root directory FNode. If the FNode can not be found in this band, try using this switch. It forces HPFS-UD to scan the complete disk for the root directory FNode.

-on Run on Machine Name

This switch forces DEPIPE to be loaded and allows HPFS-UD to access disk drives located on remote machines. The Machine Name must be specified with a leading "\\". The machine name of the remote machine will have been specified when the network software on the remote machine was installed.

Note : DESVR must be running on the remote machine for this option to work.

Consult Appendix H - DESVR for further details.

Whilst HPFS-UD is running, the function keys listed below have the following functions associated with them.

F1 - Help

The help for HPFS-UD is accessed by pressing the F1 key. If the F1 key is pressed you will see the following dialog box:

F2 - Sort the file order

By default, HPFS-UD displays the files in the order in which they are found. The F2 key instructs HPFS-UD to sort the file list in alphabetical order. As the sort progresses you will see this:

The number which is displayed is the number of entries which have been sorted so far.

F3 - Select restore disk

A: is the default drive to which the deleted files are restored. If you wish to change this, press the F3 key and you will be presented with the select restore drive dialog box:

Use the arrow keys or simply press the required drive letter. If you choose the same drive as that from which you are restoring, you will be warned with the following dialog box:

This is because you are likely to overwrite the file that you are trying to recover!

F4 - Tag all files

The F4 key tags all files which have been found.

F5 - Toggle all files

The F5 key toggles the tagged state of all files.

F6 - Toggle prompt

The F6 key toggles the current state of prompting. When prompting is on you will be asked to edit the path and filename of all restored files.

F7 - Toggle subdirectories

The F7 key toggles the current subdirectory state. When subdirectories are on, the path information from the files is not removed. With subdirectories off, all path information is removed and all files are restored into the root directory of the restore drive. All subdirectories are automatically created for you.

F8 - Search and tag files

The F8 key allows you to perform an automatic search and tag function on all of the files which have been found.

You may enter a sub string which is compared to all of the file names and if there is a match, the file is tagged. This is useful if you wish to recover all files from a particular directory.

F9 - Search and replace files

The F9 key allows you to change the file name and path of the files which have been found. There are two circumstances where this is particularly useful.

First, when the path of the file has been lost and it has been replaced with the *UNKNOWN* path. You may change the *UNKNOWN* path to what it should have been. Changing the *UNKNOWN* path back to a valid one will save considerable time in restoring the files, as you will not have to edit each path individually as it is restored.

The second circumstance is, if the path itself is incorrect. This may have happened when an old directory FNode was replaced with a newer one. You can use this option to change it back to the correct path.

Enter the characters which you wish to search for and the characters to replace with and press Enter.

F10 - Enter initial restore path

The F10 key allows you to specify an initial restore path off the root directory. This option allows you to graft the restored files to a new path. By default, the files are restored to the paths as they appear. This may cause restored files to be mixed up with normal files. There are circumstances where you may which to separate the restored files for further examination.

For example, a file "\MAX\FILE\WARPSPEED\GU-DEMO.LZH" would normally be restored to "\MAX\FILE\WARPSPEED\GU-DEMO.LZH". If you were to specify a new restore path of "RECOVERED", then using the above example, the restored file would be "\RECOVERED\MAX\FILE\WARPSPEED\GU-DEMO.LZH".

Esc - Exit

The escape key exits HPFS-UD.

Examples

HPFS-UD
HPFS-UD will scan for deleted files on the current drive.
HPFS-UD /s
HPFS-UD will scan for deleted files on the current drive and subdirectory processing will initially be turned on.
HPFS-UD H: -d
HPFS-UD will scan drive H: for valid files. This option will work on both valid and damaged volumes.
HPFS-UD D: -l
HPFS-UD will attempt to lock drive D: and search for deleted files. Using this option you will not be able to restore files to the same drive. If HPFS-UD can not lock the drive, it will not continue.
HPFS-UD H: -dz
Scan for valid files on H: and do a full disk scan for the root directory FNode.
HPFS-UD F: -on \\BBS /s
This scans for deleted files on drive F: on the remote machine named BBS. Subdirectory processing will initially be turned on.