<!-- PDF page 170 -->

Finally load the first program again by giving:

```
LOAD "part-a.bas"
```

and doing **LIST**. What you're going to see is the first program as you expected. You should now type:

```
MERGE "part-b.bas"
```

and then type **LIST**. Both programs have mixed (merged) together with line **30** being the newer one. If you had done the procedure somewhat inverted, that is **part-a.bas** was merged into **part-b.bas** then line **30** of **part-a.bas** would be the newest one and it would have overwritten line **30** of **part-b.bas** saying **PRINT "Part 3a"** instead of **PRINT "Part 3"**.

Like **LOAD** when used on tape (drive **t:**), **MERGE** does not need a defined *filespec* accepting instead just an empty string ("") and will just merge the next available program. Another good use of **MERGE** is instead of **LOAD** for programs that have been saved with the **LINE** *modifier*. **MERGE** will just load the program without executing it thus allowing you to edit instead of trying to use **BREAK** to stop execution. **MERGE** will not work with **CODE**, **SCREEN**, **LAYER** or **BANK** *modifiers*. To partly simulate that functionality, there's a *dot command* called **.extract** which we will visit later on. Finally, **MERGE** does not work with arrays (**DATA**).

### Using NextZXOS

Thus far, we have examined the major commands we can use to get files into the computer's memory, as well as store the contents of the computer's memory into files but with the exception of a slight glimpse into rudimentary cataloguing of files on a drive, we do not actually know how to manage the files. The following sections will cover all the facilities provided for file and folder management by *NextZXOS,* together with their *dot command* equivalents (the latter work on both *NextZXOS* proper as well as 48K mode and some even work on *esxDOS* which we'll cover at the end of this chapter). We will also examine the remaining features of *NextZXOS* as the system itself does much more than simple *file* and *folder* management. Let's start by examining a few concepts that are necessary in order to get a better grasp of the commands that will follow and what these do.

#### Wildcards

Earlier, we touched briefly on the subject of *wildcards*. We mentioned two characters **\*** and **?**. Their meaning is as follows:

`*` Any number of characters up to the end of the *Name* part of the *filename* if used prior to a dot within the *filespec* –and– any number of characters remaining up to the end of the *Type* part within the *filespec* if used after a dot in the *filespec*

`?` Any single character

As a note to the above, it important to remember that the *type* part of a *filename* is recognised by *NextZXOS* as a *valid* one, only if it consists of up to 3 characters. If there are more than 3 characters it is considered to be a part of the name field and the *type* is therefore considered blank.

You *cannot* use more than two **\*** within a *filespec* and each **\*** *must always be the last character* in its respective field (*Name* or *Type*) in the *filespec*, otherwise a **Bad Filename 0:1** error will be returned. Below are some examples of proper and improper usage of wildcards:

These will work:

`*.*` *Any filename* with *any type*\
`*` *Any filename* without a *type*\
`*.?` *Any filename* with any SINGLE LETTER *type*

