VOGONS

Common searches


First post, by Rekrul

User metadata
Rank Member
Rank
Member

I thought I'd post this here in case it saves anyone else from going through what happened to me. For all I know, this might be a well-known problem, but I'd never heard of it happening and the people I've talked to since had never heard of it either.

ScandDisk killed my Win98SE system!

Many people recommend setting ScanDisk to not run after a crash, however for me, most of the time when my system crashed and I aborted ScanDisk, the amount of free space on the drive would be less than what Windows was reporting. So I let it run after crashes.

I had two drives in my system and a couple weeks ago ScanDisk started reporting that there as an "invalid long filename entry" on my secondary drive, and suggesting that I run ScanDisk for Windows to fix it. It didn't say what the file was (neither did the log) and ScanDisk for Windows didn't find any problems on the drive. This was annoying because ScanDisk would stop and wait for me to acknowledge the error before continuing.

Eventually, I got tired of it coming up every time ScanDisk ran and looked on the net for a solution. I didn't find any advice on how to truly correct the problem, but I did find a recommendation to edit the ScanDisk INI file and turn off the long filename check. Supposedly this would make ScanDisk just ignore the error.

So I looked in the INI file and sure enough, there was an entry marked "LfnCheck" which says that it will "validate" and check long filenames. I set that to "off" and forgot about it.

A week ago, my system crashed again and I pressed the reset button. ScanDisk came up and I went into the kitchen to make something to eat. When I came back about 20 minutes later, it was only at 31% done. I thought it was stuck and canceled it. When Windows booted, the desktop had only generic program icons (like little DOS windows), and both the system tray and quicklaunch bar were empty. Then I noticed that my icons all had short DOS names.

I figured it was a fluke and rebooted. ScanDisk came up again, but this time it scanned my second drive. It didn't take very long and nothing seemed out of place. The desktop was the same, so I loaded Total Commander (it had to find the EXE file) and most of my custom buttons were missing. I then discovered that a good portion of the files on my boot drive, including about half the Program Files directory had been converted to 8+3 character DOS names! Then I checked my second drive and saw that with the exception of two files, every file on the drive had been converted to its DOS name! Hundreds of files with gibberish for filenames!!!

At first I thought that maybe the support for long filenames had gotten disabled and that I'd just need to re-install Windows. However to test this theory, I pulled the second drive out, popped it in another system and the results were the same. (a junk system that only works with everything disabled)

At the time, I didn't have my new system set up at all, so this was still my main system. Luckily IE still worked, so I went online to search for a cure. I found a couple pages which indicated that this could happen if you disable the long filename check in ScanDisk. Gee MS, thanks for warning me!

I downloaded a couple disk salvage programs to an external drive, but they only saw the DOS names. After much searching, I was lead to a small freeware program called Disk Investigator, which would show me the long filenames, proving that the information was still there, but it wouldn't let me 'restore' them since they weren't deleted. Deleting them would have been a bad idea because the drive was FAT32 and fragmented and Windows erases the information about the files' locations when you delete them, making it impossible to recover large files.

After more searching, I came across another free program called Uneraser which looks like a DOS program, but which can both see and recover the long filenames. The only problem is that it can only do a single file or directory at once and if you do an entire directory, it tries to restore all the deleted files as well. Meaning, it could try to revive hundreds of files that were deleted weeks or months ago, wasting both time and space, and making a mess of the recovered directory. They have a 'pro' version, but after trying the demo, it seems it can't read the original long filename info.

What I eventually ended up doing was using Uneraser to recover directories with only a few deleted files and then manually deleting them. For the rest, I used Disk Investigator to view each directory one at a time, then I used HypersnapDX's TextSnap feature to grab one screen of filenames at a time, with each snap being appended to the previous one. Once I had all the names, I'd copy the whole mess and paste it into my text editor, using block cut&paste to clip the DOS names to a separate document, then use a pair of macros to reformat each list, enclose the long names in quotes, etc. Then I'd paste the DOS names in front of the long ones, add the rename command to the start of the line, save it as a BAT file and then double-click it to rename all the files in the directory.

I did this for all the files on my second drive and some of the files on the boot drive. However there are too many subdirectories in Windows and Program Files for it to be practical to restore the entire boot drive this way. Besides, I was having other minor problems, so it's probably best that I can't just restore the drive.

The one bright spot is that since I've made a habit of always creating a directory called "Work" on the boot drive and storing my personal files there, rather than putting everything in My Documents, that entire directory survived intact. Apparently ScanDisk got bogged down with the 50,000 files in the Windows directory and didn't make it to my work directory before I killed it.

So in summary, never turn off the long filename check in ScanDisk or it may decide to go through and rename all your files to DOS 8 character names!

Reply 1 of 9, by robertmo

User metadata
Rank l33t++
Rank
l33t++

A warning about ScanDisk and Win98... (short)

So in summary, never turn off the long filename check in ScanDisk or it may decide to go through and rename all your files to DOS 8 character names!

😉

Reply 5 of 9, by Gemini000

User metadata
Rank l33t
Rank
l33t

The curious thing about file errors is that they're sometimes caused by the motherboard. On my previous system, months before the original motherboard had completely died, I was getting extremely unusual errors where random files would completely lose their time and date information not long after being accessed, including both recently created files and very old files. It got worse the closer it got to the point of figuring out the motherboard was dying and the problem went away once the motherboard eventually died and was replaced. (Though said hard drive's motor was also starting to get very grindy and I only kept it in the computer for a couple months following.)

--- Kris Asick (Gemini)
--- Pixelmusement Website: www.pixelships.com
--- Ancient DOS Games Webshow: www.pixelships.com/adg

Reply 6 of 9, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Faulty memory can wreak havoc, too.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 7 of 9, by SKARDAVNELNATE

User metadata
Rank Oldbie
Rank
Oldbie
Rekrul wrote:

Yes. I just thought people might be interested in what happened. 😀

I appreciate the detail. Hopefully no one goes through the same, but if it happens you've provided some insight about what can be done to recover from it. Being concise or being thorough are both useful at times.

Reply 8 of 9, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Might I suggest looking into learning a rudimentary scripting language like Python? It might save you some time should you have to execute an operation like that again. (It's even feasible that Python might be capable of the lower-level disk access that Uneraser or Disk Investigator used to recover the long filenames, but admittedly it might take longer to dissect those mysteries than it would be to do things the hard way.)

Rekrul wrote:

I had two drives in my system and a couple weeks ago ScanDisk started reporting that there as an "invalid long filename entry" on my secondary drive, and suggesting that I run ScanDisk for Windows to fix it. It didn't say what the file was (neither did the log) and ScanDisk for Windows didn't find any problems on the drive.

It might have been a foreign-language filename. I'm not sure how it would get on the drive to begin with, but Scandisk doesn't recognize those.

Reply 9 of 9, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++
Dominus wrote:

Faulty memory can wreak havoc, too.

Yea I once had a machine which was fine for gaming but when burning Audio CDs you could hear these clicks.

Later I found out that a memory module was faulty.