Microsoft DOS smartdrv command

Quick links

About smartdrv
Smartdrv syntax
Smartdrv examples

About smartdrv

The smartdrv, or smartdrive, is an utility that can be loaded in the autoexec.bat to create a disk cache in conventional memory or extended memory.

Many times users will use this utility on their boot disks as it can sometimes greatly increase the speed of how MS-DOS accesses disk drives.

Note: Users who are using Microsoft Windows instead of MS-DOS should not load this line in the autoexec.bat and should not run this command while Windows is running. Users running Microsoft Windows 95 or 98 will not be able to load this command unless they are in an MS-DOS shell.


The smartdrv.exe command is an external command that is available in the below Microsoft operating systems.

MS-DOS 6.0 and above
Windows 3.x
Windows 95
Windows 98

Smartdrv syntax

Installs and configures the SMARTDrive disk-caching utility.

SMARTDRV [/X] [[drive[+|-]]...] [/U] [/C | /R] [/F | /N] [/L] [/V | /Q | /S] [InitCacheSize [WinCacheSize]] [/E:ElementSize] [/B:BufferSize]

/X Disables write-behind caching for all drives.
drive Sets caching options on specific drive(s). The specified drive(s) have write-caching disabled unless you add +.
+ Enables write-behind caching for the specified drive.
- Disables all caching for the specified drive.
/U Do not load CD-ROM caching module.
/C Writes all information currently in write-cache to hard disk.
/R Clears the cache and restarts SMARTDrive.
/F Writes cached data before command prompt returns (default).
/N Doesn't write cached data before command prompt returns.
/L Prevents SMARTDrive from loading itself into upper memory.
/V Displays SMARTDrive status messages when loading.
/Q Does not display status information.
/S Displays additional information about SMARTDrive's status.
InitCacheSize Specifies XMS memory (KB) for the cache.

Extended memory InitCacheSize value
1MB or less All
1MB to 2MB 1MB
2MB to 4MB 1MB
4MB to 6MB 2MB
6MB or more 2MB
WinCacheSize Specifies XMS memory (KB) for the cache with Windows. If this option is not specified smartdrv will default the wincachesize to the amount of extended memory available. Below is a basic chart of what will be set.

Extended memory WinCacheSize value
1MB or less 0
1MB to 2MB 256KB
2MB to 4MB 512KB
4MB to 6MB 1MB
6MB or more 2MB
/E:ElementSize Specifies how many bytes of information to move at one time.
/B:BufferSize Specifies the size of the read-ahead buffer.

Smartdrv examples

c:\dos\smartdrv.exe /x

Placed in the autoexec.bat. This command loads the smartdrv utility into memory and allows it to be used as well as disables the write-behind caching for all drives.

c:\dos\smartdrv.exe C 1024 512

Specifies a size to be used with smartdrv. When a cache size is not specified, smartdrv will use all extended or expanded memory.