Command line switches

The RAM Disk package includes two executable files in the application folder that accept command line parameters:

ramdisk.exe

This executable is used to manipulate a predefined RAM disk configuration that is accessible via the graphical user interface (GUI). Any command issued with ramdisk.exe will modify the current configuration, which is reflected within the GUI. Use ramdisk.exe to add, remove, or alter your RAM disk setup. These changes are persistent and will be restored upon the next system boot.

Switch Description Examples
/import:filename.xml Reads RAM disk definitions previously saved to a file by the File – Export Disks command. Disk definitions read from the file are appended to the existing ones and are not mounted. /import:"C:\John Smith\test.xml"
/mount:driveletter Mounts an existing RAM disk. Specify all to mount all the existing RAM disks. /mount:R
/mount:all
/unmount:driveletter Unmounts an existing RAM disk. Specify all to unmount all the existing RAM disks. Specify /force before /unmount for forced unmount. /unmount:R
/force /unmount:all
/save:driveletter Saves an existing RAM disk to its associated image file. Specify all to save all the existing RAM disks. /save:R
/save:all
/del:driveletter Deletes an existing RAM disk. Specify all to delete all the existing RAM disks. /del:R
/del:all

/add:param=value, param=value,...

Adds a new RAM disk based on the following case-insensitive parameters:

Parameter Description
type=[logon|boot] Disk type. Can be either logon-time disk or boot-time disk. The former is mounted upon user logon, the latter is mounted upon system boot. The default value is boot.
letter=[A-Z] Drive letter. Can be any available letter from A to Z. This parameter is required.
fs=[FAT|FAT32|exFAT|NTFS] File system. Can be either FAT, FAT32, exFAT or NTFS. The default value is RAW, for no file system.
csize=16[K|M] Cluster size, also known as allocation unit size. It is a number followed by multiplier K for kilobytes, M for megabytes, or no multiplier for bytes. The cluster size value must be a power of 2. Its allowed range depends on the file system, but generally is from 512 bytes to 32 megabytes.
image=imagefile.img Path to an image file. Creates a RAM disk based on the image file specified.
size=100[K|M|G] Size of the disk. Can be specified as a number followed by a multiplier, e.g. 10M, or 1G. This value is required unless the image option is present.
label=disklabel Optional volume label. This value is only valid when the file system is FAT, FAT32, exFAT or NTFS.
save=[yes|no] Mark the volume as persistent. This value is only valid when an image file is used. The default value is no and changes are not saved back to the associated image file.
mount=[yes|no] Mount and make the disk available immediately. The default value is yes and the disk is mounted upon creation.

/add:"letter=R, fs=exFAT, csize=16K, size=100M"

/add:"letter=I, image=c:\image files\filename.img"

/add:"type=boot, letter=B, fs=NTFS, size=50M, mount=no"

ramdiskc.exe

This is a dedicated console tool designed for on-demand usage. It allows you to create and remove RAM disks directly from scripts or services without impacting the saved configuration displayed in the GUI. Disks created with ramdiskc.exe are temporary and will be automatically removed on shutdown or reboot. To view its usage syntax, run ramdiskc.exe in a command prompt without any parameters.

Switch Description Examples
/add:driveletter /param:value,... Adds a new RAM disk with the following optional parameters: /add:R /size:100m /fs:fat32
/add:K /size:1g /fs:ntfsc /label:MyCompressedDisk
Parameter Description
/fs Disk file system. Can be FAT, FAT32, exFAT, NTFS or NTFSC (compressed).
/size Disk size as a number followed by a multiplier, e.g. 10M or 1G. This parameter is required.
/label Optional volume label. Valid when a file system is created.
/csize Optional cluster size. Valid when a file system is created.
/hdd Enable Hard Disk Drive emulation (slower).
/rem Mount the disk as a removable device.
/numa Allocate memory in the specified NUMA node.
/del:driveletter Deletes an existing RAM disk. The /force parameter can be used to delete the disk even if it has open files. /del:R
/del:K /force