MS-DOS 6.22 Scandisk error: "Out of memory"


I am running MS-DOS 6.22 on an old (c. 2000) laptop made by "Fieldworks".  I would like please:

  1. To get another version of scandisk from somewhere.  Do you know where to find one?  I've tried Google.
  2. To get around a problem with my current version of scandisk, whatever that version is.

The problem we are having is, when I type 'scandisk /autofix /surface', or even just 'scandisk' (it behaves the same), it takes me to the scandisk GUI, then starts searching automatically.  It says the FAT is fine, then displays this message:

    C:\SMPDATA\3193\OSMP0000.MAD had an incorrect size.

And this error:

    Out of memory.  There are still errors in drive C

There is over 1GB of space on drive C, so memory should not be an issue unless it is talking about RAM.  When I click 'OK', scandisk finishes and that is the end of that!  Hence I'd either like to get around this problem or get another version of scandisk if one exists.


We recently had some harddisk issues, in which this scenario happened twice:

  a. We start running a patient-monitoring application that produces the kind of .MAD files (custom extension) mentioned above.
  b. Recently it has begun crashing more often than normal.
  c. The file OSMP0000.MAD was in the process of being created by the application while the computer crashed.
     (It is the massive data file containing a log of the patient's heart rate, blood pressure, etc.)
  d. The file still contained most of the data, which i would like to recover, but I cannot copy the file.  I get this error:
           Sector not found reading drive C
           Fail on INT 24   -OSMP0000.MAD

Hence we turned to scandisk!  I am running scandisk to help recover the data.  There are two .MAD files we need to recover, each a few megabytes.

Thank you in advance for your assistance.

Mark EbdenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't think a different version of scandisk will help - and if memory serves correctly, it will complain that it was built for a different version of DOS.  You may have better luck trying Norton Disk Doctor, or something like that.
Although, it sounds like you may not, easily, be able to recover the file in question, try running
and if that succeeds successfully, try rerunning scandisk.
You may want to try booting without too many things loading in your config.sys and autoexec.bat, if you're running out of memory (yes, RAM).
Preceed lines you don't need in config.sys with a semicolon ";" and in autoexec.bat with a double-colon "::" (not the quotes).  "REM" will work as well.
Generally, you can prevent loading anything related to a sound card, cd-rom, etc., at least temporarily to try to get through this. . .Good luck!


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Your computer does not have enough free memory to defrag the drive. Quit one or more programs.
ID# Defrag009
ScanDisk could not continue because your computer does not have enough available memory.
This issue can occur if you are running Windows on a hard disk that is larger than 8 gigabytes (GB) in size and has a cluster size less than 8 kilobytes (KB). This configuration may be created if you use a third-party disk tool to create a partition on a hard disk that is larger than 8 (GB) in size and has a cluster size less than 8 KB.
To resolve this issue, contact the manufacturer of the third-party hard disk tool to inquire about a possible update to the software that resolves this issue.

The standard FAT32 cluster size of 4,096 bytes only applies for hard disks smaller than 8 GB. The third-party hard disk tool may change the cluster size to 4,096 bytes per allocation unit.

The default cluster sizes are listed in the following table.
Hard disk size Cluster size

512 MB to 8 GB — 4 KB

8 GB to 16 GB — 8 KB

16 GB and larger — 16 KB

matter of fact check this whole page, if for no other reason then to know you are not alone, and maybe something here can help 
for more info see these links 

Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

file recovery software
I will post the whole list.

File Rescue 2.5




Fast File Undelete


File Recover 2000


File Restore

If you've deleted your data and you want to get it back, you need FileRestore.

FileRestore is a simple, easy-to-use tool for recovering files that have been lost or deleted from your

Windows system.

Designed for Windows XP, 2000, NT, Me, and 9x

Disk Commander

In virtually any situation where you need to recover lost data from a Windows system, Disk Commander

is the solution. Disk Commander performs a wide range of data recovery operations.

Drive Rescue

Supported file systems: FAT 12/16/32

Windows® 95, 98, ME, NT, 2000 or XP


Tool to check and undelete partition

Works with the following partitions:

- FAT12 FAT16 FAT32

- Linux

- Linux SWAP (version 1 and 2)

- NTFS (Windows NT)

- BeFS (BeOS)


- Netware

- RaiserFS



Emergency Undelete


List copied from CrazyOne (thanks Spence!!)

I agree with sirbounty, go run chkdsk
If it persists, think of rebuild (format)
Before that, think af antivirus
We recently got a virus in one of our own custom extensions and did not catch it for a week, and had many questions why not caught earlier
Our daily & runtime A/V scanned only the normal executables
The weekend one scanned all extentions
So you might want to try scanning of all file extensions if you have not done so yet

You can also try to copy the file. You may not be able to in DOS, but you may inside the application. If successful then you can try deleting original.
But I suspect tha chkdsk/f (fix) will do what you want.
I once tried to install Win98 on c:
Before it would install windows, it ran scandisk
I got "Error on D:, Run ScanDisk from Windows"
Why it needed D: to be good to continue, or thought I had Windows it did not install yet was beyond me.
(so I moved on to Win2k instead)
Scandisk may not be as good for results as chkdsk
Well there are ways to fix your problem, first thing i would do is press F5 upon bootup, and it will skip autoexec.bat and config.sys,

then rename autoexec.bat and config.sys to autoexec.(your initials here works best) just so you can remember what they are.

then reboot and try again,

if there are still memory errors, try loading himem.sys in a NEWLY CREATED autoexec.bat before running the install

Scandisk and chkdsk for DOS are BOTH no-nos!!!

If the data are important, you should try to clone the drive first, and work with the copies.  Since you already used scandisk, you may be out of luck.

The list provided by stevenlewis notwithstanding, I think the best data recovery/HD fixing tool is Steve Gibson's spinrite, available from .  I've used it for years (since '98, I believe, which is when v5 was released).

Okay, I'll bite. .
"Why" would you say that >>>Scandisk and chkdsk for DOS are BOTH no-nos!!!<<<???

I couldn't hit it dead-on, but I'm certain I've used both in a DOS 6.22 environment at least, oh, 500 times. . . .
I think he was referring to the fact that they may try to fix the file, and may permanently damage it in the process (just a guess).

I think we need to hear from the questioner at this point
Yeah, that's about it (the try and permanently damage part...)

While I do use scandisk and chkdsk in my clients' DOS systems, it's always in check-but-don't-auto-fix mode.  If there are problems reported, I use spinrite.... I just wish Gibson'd come out with an NTFS version...

Way-back-when, there were a number of printed and online articles enumerating the shortcomings of scandisk, especially, but I don't have references.  It's the, "you get what you pay for" scenario - and scandisk/chkdsk are free with the OS.  I seem to remember reading scandisk being a watered down NDD (I don't think in this thread...  :-)  )

Cross-linked files, where scandisk makes duplicates, or the probable-temp-files-that-can-be-deleted are ok, but the "sector error reading drive C:" message initially indicates a surface defect or similar - and, again, I've experienced (and read) too many good things about spinrite to bother with anything else.  It uses something called dynastat (sp?) recovery that tries to figure out the missing data.  And, that has come in handy more than once!

Mark EbdenAuthor Commented:

Many thanks for all your help!  Sorry for the delay, but I was able to get what I wanted by editing config.sys and autoexec.bat, although the data was lost.
May I ask what specifically you changed in them? (Just for future reference)

Mark EbdenAuthor Commented:

The biggest change was I commented out the loading of the PCMCIA driver, to free up memory.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.