<!-- PDF page 160 -->

*type field* is specified, it must be preceded by a dot. Unlike some other BASICs, *NextBASIC* does not automatically allocate a *type* to files if one is not specified.

You may find it useful to add your own *types* – a popular convention is to use **.BAS** to identify *NextBASIC* file *types* and **.BIN** or **.COD** to identify machine code file *types*.

*NextBASIC* already understands a number of popular *types*. Going to **c:/nextzxos** with the browser, placing the cursor over browser.cfg and pressing **ENTER** will return the most commonly used ones together with the action that will be taken when the *Browser* launches them.

The characters **\*** and **?** are called *wildcards* and have a special meaning to *NextZXOS*. They're used to substitute ranges of characters or specific characters in *filenames* and *folders*. We'll see why this is particularly useful further below.

The dot character **.** also has a special meaning according to how many we use. If we use one (**.**) it means *this folder* and if we use two (**..**) it means *the folder one level up*. Keep this information in mind as it will prove very useful in the examples we'll encounter.

The following are some examples of valid *filenames*:

- **z**
- **squares**
- **m:picture.bin**
- **a:fred**
- **13a:hello**
- **0M:CAPITALS**
- **file name**
- **test.bas**
- **philip**
- **glass.mus**
- **a:a.a**
- **c:/nextzxos/browser.cfg**
- **c:\nextzxos\browser.cfg**
- **7:dubious**

while the *filenames* below are illegal and attempting to use them will produce an error:

- **<>-+=!&** (must not contain any of these characters)
- **\*test** (cannot contain an asterisk)
- **te?st** (cannot contain a question mark)

Note that in the list above we've made two assumptions regarding valid *filenames*, and these are that *drive names* **a:** and **m:** are *virtual disks* and the *RAMdisk* respectively. *User areas* are acceptable parts of *filenames* ONLY if the *drive*'s *filesystem* allows them; otherwise you will get an error.

With that information in hand, let's start examining below the main commands for working with files.

### LOAD

**LOAD** as its name implies retrieves a *file* from a *drive* and puts it (*loads* it) in the computer's memory. Depending on how it was saved (in the case of *NextBASIC* programs) or named (in the case of machine code software) it may also execute it as well. It takes the form:

**LOAD** *filespec* [*MODIFIER* [*options*]]

where *filespec* is a *filename* as described in the previous section followed by an optional *MODIFIER* directive (**SCREEN$**, **LAYER**, **CODE**, **DATA**, **INT**, **INPUT or BANK**) which in turn may have optional parameters.

