Uses part of the computer's random-access memory (RAM) to simulate a hard disk drive.


Device=[Path]RamDrive.sys [Switches] [Parameters]

[Path] The full path. Default is the root directory of the start-up drive (usually C:/)
DiskSize Specifies the size of the RAM drive in Kb. Valid values for DiskSize are from 4 to 32767 or amount of memory available, whichever is less. (Default is 64).
SectorSize Specifies the disk sector size in bytes. SectorSize can be 128, 256, or 512 bytes (Default: 512). If a value is specified for SectorSize, DiskSize must also be specified.
NumEntries Specifies the maximum number of files and directories you can create in the RAM drive's root directory. NumEntries can be from 2 to 1024 entries (Default is 64). If specified, NumEntries is rounded up to the nearest sector size boundary.
If NumEntries is specified, DiskSize and SectorSize must also be specified.
If there is not enough memory to create the RAM drive as specified, RAMDrive will try to create it with a limit of 16 directory entries. This may result in a RAM drive with a different limit from the one you specified.
By default, RamDrive.sys will create the RAM Disk in conventional memory. The preferred option is to create the disk(s) in extended memory.
/E Creates the RAM drive in extended memory. For RAMDrive to use extended memory, the system must be configured so that it provides extended memory via a device driver such as Himem.sys, for example.
/A Creates the RAM drive in expanded memory. For RAMDrive to use expanded memory, the system must be configured so that it provides expanded memory via an expanded-memory manager such as EMM386.


  1. This device driver must be loaded by a DEVICE or DEVICEHIGH command in your CONFIG.SYS file.

  2. RAM drives are much faster than hard disk drives because your computer can read information faster from memory than from a hard disk. As far as the computer is concerned, a RAM drive appears to be a normal hard disk drive which can be used as any other hard drive.

  3. The most important difference between a real disk drive and a RAM drive is that all information on a RAM drive is lost when the computer is turned off/restarted. It is thus most important to save any data written to a RAM disk on more permanent media before shutting down.

  4. Ramdrive.sys can create RAM drives with capacities up to 32Mb. Multiple RAM drives can be set up. Each drive must be specified separately.

  5. In a Dos environment, RAM drives can be particularly useful when working with programs that do frequent disk read/write operations - often with temporary files.

  6. In a Win95/8 environment, RAM drives are seldom useful because Windows uses all available memory. Although it may seem a neat idea to use a RAM drive for the Windows swap file, this is very seldom practical. Windows only uses a swap file when it has run out of RAM. Reducing the amount of available RAM by making a RAM drive will mean that a swap file will be required sooner (and it won't be large enough, anyway). In short, creating a RAM drive to use for a swap file is equivalent to specifing a swap file size of 0 without a RAM drive - in both cases most systems will typically give an "out of memory" message sooner or later.

  7. There are alternative RAM drives available that do not need to be loaded in Config.sys and/or do not have the 32Mb limit. I have not used any myself but see: The Simtel.Net MS-DOS Collection - Memory resident disks


To create a RAM Drive of 32 Mb (the maximum possible with RamDrive.sys), include the following lines in Config.sys:
Device=c:\Windows\Himem.sysEnables access to extended memory
Device=c:\Windows\Emm386.exe NoEmsProvides access to upper memory blocks (UMBs)
Dos=High,UMBLets Dos load into high memory and manage the UMBs
DeviceHigh=c:\Windows\RamDrive.sys 32767 /E  Creates a 32 Mb RAM Drive in extended memory.

File Details

File NameDefault LocationDos Ver.Win Ver.SizeDateSource
Ramdrive.sysc:\windows 7.0Win95 12 663111/07/95win95_09.cab
7.1Win95 (OSR2.x) 12 663124/08/96win95_14.cab
Win98 12 663111/05/98base5.cab
Win98 SE 12 663123/04/99?

Superscripts denote which same size files, if any, are identical (using FC).

If you should have any comments or suggestions,
please contact: Bob Watson
This page last revised:
August 29, 2000