<!-- PDF page 176 -->

```
THISIS~1.BAS                  1K

 1887M free
This Is A Hello World Program.ba
s                             1K

 1887M free

0 OK, 0:1
```

you'll notice that the *long filename* **This Is A Hello World Program.bas** got truncated to its first **6** characters after trimming all space characters followed by a tilde ~ character and the number **1**. This is to help differentiate from other files with *long filenames* that look alike in the first 8 characters of their *filename* (omitting spaces). To demonstrate this, type:

```
SAVE "This Is A Hello United Kingdom
Program.bas"
```

and

```
SAVE "This Is A.bas"
```

followed by

```
CAT - "th*.bas"
```

The resulting display will now be:

```
THISIS~1.BAS                  1K
THISIS~2.BAS                  1K
THISISA .BAS                  1K

 1887M free

0 OK, 0:1
```

As you can see a **~2** was added to the **This Is A Hello United Kingdom Program.bas** *filename* when it was shortened otherwise you couldn't differentiate it from the **This Is A Hello World Program.bas** as they both share the same starting characters. As a matter of fact *NextZXOS* when faced with a lot of similar *filenames* will keep adding consecutive numbers truncating the original *filename* further until all the files are displayed in short format. If you now use **CAT** with **EXP** you'll get to see a number of things. First, if you don't have a *Real Time Clock module* installed, you will see that all the files you just saved have the same date and time on them and secondly that in the second column, the second character from the left has turned into **a** from a single dash (-). This signifies that the *archive attribute* has been set. **CAT** becomes more powerful with the use of *wildcards*, allowing us to get a list of only the files we're interested in, omitting all others that may clutter our display. For example:

```
CAT "*.tap"
```

will show us all the **.tap** *format tape image files,* we have stored in the current *drive* and *folder*.

Thus far we have only displayed the ability to list files contained within the *current drive* and folder, however **CAT** can display *files* in different *drives*, *folders*, *user areas* or a combination of the above (when the combination is supported by the *filesystem* of the *drive*). We can instruct **CAT** to produce listings of *files* and *folders* inside *drives* other than our *current drive* or *folder* or even *user area* without having to change our *default filespec* to that specific area. We'll cover the subject of changing the *default filespec* shortly so for now here are some examples:\
**CAT "m:"** Displays a list of all files in drive **m:**\
**CAT "2m:"** Displays a list of all files in user area **2** of drive **m:**

