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



Prints the contents of the disk in a drive.

If you use version 2 of Disk BASIC, then LFILES will prints the contents of the current directory in a drive (files and subdirectories).


DFILES "<Device>:\<Path>\<Filename>",L

The L parameter is optional.


  • 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 print the file(s) of 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 you want to print. Each folder name in path are separate by a backslash (\). This parameter is only available in version 2 of Disk BASIC.

<Filename> is the file name to search. Wildcards can replace some characters in filename to get several files. The asterisk (*) and question mark (?) are used as wildcard characters. The asterisk matches any sequence of characters, whereas the question mark matches any single character.

The parameter L is only available in version 2 of Disk BASIC.

If you don't specify it (or can't specify it because you are using version 1 of Disk BASIC), all files in the file-listing will use 8 characters for the filename, a dot (.) and 3 characters for the extension.

If you specify this parameter, the file-listing will be in long format with the file names, the attributes and the sizes of the files.


LFILES "B:"  'Print all files on drive B: 
LFILES "M*.*" 'Print all files with a name beginning with character M
LFILES "*.BAS" 'Print all files with the extension ".BAS" 
LFILES "*.*" 'Print all the files (same effect as LFILES without any pattern)

Related to



Disk BASIC 1.0 or higher / both modes of Nextor OS