PDA

View Full Version : Development idea: CHKDSK.TXT handling


potter
04-24-2006, 02:52 PM
Observation:

When the Lifedrive (and I assume other NVFS devices) soft-resets (either because hitting the reset button, or because of an application fault) it performs a Check-Disk (CHKDSK) on the "Storage" and "LifeDrive" partitions. If errors are found it will leave a CHKDSK.TXT file in the root noting the errors found and actions taken. (Using FileZ one can see the storage partition if one enables "Show Hidden Volumes" in the General Preferences dialog box.) Three times I have lost my "Saved Preferences" and twice I have lost my Application launcher preferences. The last two times this happened, checking the Storage partition's CHKDSK.TXT file, I could see were CHKDSK thought these files "starts with free cluster" "repair action: truncating".

However, the CHKDSK.TXT file give the 8.3 "fixed" filename, and not the long file names. Also, the long file names on the "Storage" partition are encoded such that some characters are replaced the %## notation.

Therefore: Some development ideas:

Modify FileZ such that is can display the 8.3 file names. This would aid in finding what files got hit by CHKDSK.

New program that:
Listens for the device reset notification. When received, check for the existence of the CHKDSK.TXT files. If they exist, read and decode (8.3 to long file name and %## translation) the file recording the information into a "log" file (thus CHKDSKs from successive resets will not overwrite the information from earlier resets).
Launching the application allows one to view this log.
Augment a VFS backup program such that it performs functions similar to #2, but also allows one to then restore individual files detected as having been corrupted.