This page was last modified 15:00, 8 November 2021 by Mars2000you. Based on work by Gdx and Rderooy.



Deletes file(s) of the disk in a drive.


KILL "<Device>:\<Path>\<Filename>"


  • Character backslash (\) serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name.
  • Character backslash is replaced by the character yen (¥) on Japanese MSX or the character won (₩) on Korean MSX.


<Device> is the name for used device. It can only be a disk drive.

If you don't specify the drive, the computer will kill file(s) on the currently active drive (by default, it's drive A:)

Device type Device name Remark
Disk drive A, B, C, D, E, F, G, H A floppy disk interface can control until 2 drives.

<Path> is used to specify the location in folders of the files that you want to delete. Each folder name in path are separate by a backslash (\). This parameter is only available in version 2 of Disk BASIC.

<Filename> is a string containing a file name (name+extension). Wildcard characters can be used as a filter, wildcard characters available are the asterisk (*) and question mark (?). The asterisk matches any sequence of characters, whereas the question mark matches any single character.


KILL "M*.*" 'KIll all files with a name beginning with character M
KILL "*.BAS" 'Kill all files with the extension ".BAS" 
KILL "*.*" 'Kill all the files
KILL "B:*READ.TXT" 'Kill file READ.TXT in drive B

Related to



Disk BASIC 1.0 or higher / both modes of Nextor OS