Section Seven - Filer reference

Section Seven - Filer reference

 

This section describes the more advanced features and commands of the Filer popdown, and should be read in conjunction with The Filer. The features described here include:

Here, you will find the following chapters:

Describes filename syntax, filename extensions, directory structure, device specifications and wildcards.

Describes commands that provide facilities for creating directories, manipulating files within the hierarchical directory structure.

Describes how to use the Command Line Interpreter with text files, reference of special commands for the CLI, redirecting of I/O and how to utilize this for editing BBC BASIC programs in PipeDream.

A little story about Directories

Users may not understand the value of using "The Filing System Hierarchical System," until it is too late. Here is a fictitious example showing what 482 files could look like if they are just dumped into the flash card. There are no directories, and when using EPROMs or Flashcards, no date is stored. The order of the files are known. the first file saved is on Page 1 top left-hand corner and the last file is on Page 2, bottom right-hand corner. There is no way of knowing what each file contains. Perhaps the answer is in the file name.

Page 1

Page 2

Page 1

Page 2

NOTE

The numbers on the left column indicates the file size.

File names

The first 6 file-names were on the flash card to start with, but then there are

286 RECEIPT
863 DEBT
739 FONENOS2

Now what you need to ask yourself when choosing a file name is,

will I remember what this would be about in 10 years time,

just by looking at the file name? If I asked you now, what would you say for the first one, "that's a receipt?" Now that is a good start, but, what was it for? Who was it from? When was it issued? The only way of knowing that is by opening the file and having a look.

Other file names down the list include

123 5
141 4
140 3

These file names could mean anything. You can have 12 characters to describe what the file is and the first file here is 5. There are some other clues. File 5 was saved before File 4 and File 3, but again without knowing what all these files are the only way again of knowing what they are is again by opening them and having a look.

Q & A

Q When is the best time to sort out your file names?
Q When is the best time to sort out your directories?

A At the beginning 

Looking at the file name  286 RECEIPT and then the questions we asked about it i.e. what was it for? Who was it from? When was it issued? These answers may be put into the Directories. i.e.

/BATHROOM/PLUMBER/20150714/RECEIPT

This now shows that the receipt was for the PLUMBER who did some work in the BATHROOM on the 14th July 2015.

Writing Dates

If the date is written backwards, i.e. YYYYMMDD the numbers can be easily sorted.

Do not think, I will use this name for now and will change it later. This example was based on 'real-life,' the file names never got changed. 

Specifying file names in full

The Filing System Hierarchical System

The Filing System Hierarchical System

The Filing System Hierarchical System looks like an upside down tree with the Device at the top.
Underneath that can be either a Directory or a filename,
Underneath that can be either a Directory or a filename,
and so on ... 

The full form of a file name is
:DEVICE I DIRECTORY I DIRECTORY I .... /filename
where
DEVICE is one of the specification listed below
DIRECTORY and filename are each of the form
name.extension
consisting of a name of up to 12 letters or digits, followed by an optional extension of up to three letters or digits, DIRECTORY is a directory name subject to the same constraints as filename.

All ISO characters (such as é and å) are allowed in filenamesOZ4.7.

The following extensions are used for system functions:

.sgn

For

symb_square.png

+K and

symb_square.png

+S CLI files

.CLI

For BOOT.CLI; see CLI files section below

.L

For PipeDream multi-file List file

In addition the following symbols can be used:

../name

Parent directory of name

.

Current directory

Device specifications

DEVICE can be specified as one of the following in Application Load or Save operations:

Specification

Effect

Specification

Effect

:RAM.0 

RAM in slot 0 (internal memory)

:RAM.1 

RAM in slot 1 (external memory)

:RAM.2 

RAM in slot 2 (external memory)

:RAM.3 

RAM in slot 3 (external memory)

:RAM.- 

Any RAM memory; ie 0, 1, 2, or 3. Used by CLI for temporary files, and lost on reset.

:EPR.0 

FLASH or EPROM in slot 0 (internal memory)OZ4.7

:EPR.1 

FLASH or EPROM in slot 1 (external file area)OZ4.7

:EPR.2 

FLASH or EPROM in slot 2 (external file area)OZ4.7

:EPR.3 

FLASH or EPROM in slot 3 (external file area)OZ4.7

:ROM.0 

ROM

:SCR.0 

Screen

:PRT.0 

Printer; via printer driver so that highlight codes are interpreted

:COM.0 

Communications; via serial port

:INP.0 

Standard input

:OUT.0 

Standard output

:NUL.0

Null: absorbs output, and acts like an empty file on input

Wildcards

The device, directory and file name can contain the following wildcards:

*

Matches any number of characters (or none)

?

Matches a single character

//

Matches any number of directories (or none)

For example,

:*//letter

Finds the file called letter anywhere

doc*

Finds: doc. tx, document, doc27, doc, etc

*.*

Finds only files with extensions.

../fred

Finds all files beginning with fred in the parent directory

Note that the characters / and \ may be used interchangeably.

MENU Commands

Press 

to see the COMMANDS menu:

Catalogue Files  
CF

Gives fuller information about a specified list of files in RAM. The subset of files to be catalogued is specified after the prompt

Name :   

Reply as follows:

catalogues all files (in the current directory) 

fred*

catalogues all files beginning with fred

*.bas

catalogues all files with a bas extension

Each file will be listed as:

File name 

Creation date & time

 Last updated date & time 

Size (in characters)

File name 

Creation date & time

 Last updated date & time 

Size (in characters)

letter.txt

Today

17:42:54

Today

17:42:54

1254

novel.txt

01-Jun-1987

17:41:17

Today

14:32:58

13112

game.bas

02-Jun-1987

12:27:43

02-Jun-1987

12:27:43

827

 

Updated Date is the only Date used

Although both the Creation date & time and Last updated date & time are shown in two columns in practise, they remain the same value as none of the applications on the Z88 use this feature i.e. when the file is changed, the creation date & time is also updated.

The last updated time and date are only relevant if OPENUP is used from BASIC. If the file is open at the time it is catalogued, the size will not be shown.

 

CE

 Catalogue File Card

 

Gives a list of information on all files in a Flash or EPROM card. The directories and file names will be given to show where the files originally came from.

Flashing Display whilst using Flash or EPROM card is normal

When you catalogue or save to a blank EPROM, the display will go blank for a few seconds while the EPROM is checked. This also happens with Flash cards when OZ is running on the same card. This happens only once; afterwards cataloging is without flickering.

 

The header of Erased EPROM has also been removed

If the Card has been erased, it will check the file area is blank and blow a header so that the file area is recognised by the

CARD command in the INDEX.

Note

The Date information on files is not stored in either the Flash or EPROM cards. If this information is important, consider saving the file to the Desktop computer, where the date information is also transferred. Zipping the file in RAM before saving it to the Eprom card will retain the date.

UV EPROM fully erased?

From OZ 4.5 a check is made that the file area is fully erased when using this command for the first time. Users using previous versions should check that the EPROM is fully erased using ROMcombiner.

 
ES

 Save to File Card

 

 

Copies files from the filing system to a Flash or EPROM card. The file or files to be saved can either be selected as already described, or specified after the prompt

Name :   

 

 

 

When a file is being saved to EPROM or to a Flash card in Slot 1, the screen will blank intermittently (if OZ is running on the same card) until saving is completed, when the Cambridge Z88 will bleep.

 

Warning: the display may be blank for a long time when saving large files

When saving very large file, the Z88 may appear to be doing nothing. It isn't, it is just working as fast as it can so leave it alone. For example a 368K file can take up to 3 minutes to complete, so just wait.

Several files may be saved at the same time. See Select Extra File

UV EPROM fully erased?

From OZ 4.5 a check is made that the file area is fully erased when using this command for the first time. Users using previous versions should check that the EPROM is fully erased using ROMcombiner.

 
EF

Fetch from File Card

 

Copies files from Flash or EPROM card back to the filing system. Gives the prompts

     Source : 
Destination :

Source: specifies the name of the file in the EPROM.

Destination: gives the name it is to be saved as in the destination filing system. It is initially set to the same as the source name, but you can edit it if you want to save the file under a different name.

CO

 Copy

 

Makes a second copy of a file in RAM. Gives the prompt

    Name :

allowing you to specify the file name to be copied, followed by the prompt

New name :

for the name of the copy.

Multiple files (selected in the catalogue window) can be merged into a single file with the Copy command; they will be appended in the order in which they were selected. See Select Extra File

RE

 Rename

 

Allows the name of a file in RAM to be altered. Gives the prompts

    Name : 
New name :

For example, to change the name of a file from game.bas to 0ldversion you would specify

    Name : game.bas 
New name : oldversion

Note that you cannot use the Rename command to move a file from one directory or device to another. The new name must be a simple file name; devices and path names are not permitted.

ER

Erase

 

Allows one or more files from RAM to be removed from the filing system. Gives the prompt

Name :

followed by the prompt

Confirm each file ? Yes

Pressing 

will prompt for each file you have selected to be erased, so allowing you to change your decision for any particular file. Alternatively, changing the option to No by typing N will erase all the selected files without further prompting.

You will not be permitted to erase a file which is in use; for example, a directory containing other files, or an open BASIC file.

Several files may be erased at the same time. See Select Extra File

Warning

Because parts of an erased file in RAM may still be present, you should not rely on the Erase command for disposing of confidential information from the system

Note

The file area in the Flash cards are erased (or formatted) using Flashstore or Filer (

EC).

Files can only be erased from the EPROM with the EPROM eraser using ultra-violet light.

SE

Select File Card

 

Selects the slot for the default File Card. This is selected using the number keys, 0-3 or

J to toggle each slot number.

Note

As a blank EPROM may be used, any slot may be selected. The user needs to ensure that the correct slot is valid.

EC

Create File Card

 

If the Flash card is blank, this command formats the File Area for the first time. If this has already been done and there are some files already saved, this command will format the file area again after giving a warning.

WARNING

ALL FILES WILL BE REMOVED. All Applications that are on the Flash card will be unaffected and remain on the card.

Sl

Select Directory

 

Sets the current directory to the specified directory. Gives the prompt

Name :

displaying the current directory string (if any).

For example; to set the current directory to directory TEXT in the current directory, specify

Name : TEXT

If the directory has not been created, a File not found error will be displayed.

SV

Select Device

 

Sets the current RAM device. Gives a prompt such as

Name : :RAM.1

showing the current device, which can be edited to the required new device.

The Select Device command resets the current directory to the root directory.

The Select Device and Select Directory commands affect the device and directory for the activity from which the Filer was entered, if there is one. This allows different activities to use different devices and directories without the need for specifying them explicitly each time.

If you save files having set a device and/or directory from one activity, and then enter the Filer from another activity, you may be in a different device and/or Directory. Check that the directory displayed at the top of the DIRECTORY window is the intended directory you wish to use.

symb_down.png

       

 

Down Directory

Up Directory

 

These commands are used for traversing a hierarchical directory structure. To select a directory move the highlight bar to the directory name in the Filer DIRECTORY window and press 

. To go back up to the parent directory press 
.

EX

Execute

 

Executes a CLI file of commands specified after the prompt

Name : I

See CLI files below.

CD

Create Directory

 

Creates a directory within the current directory; the name is specified after the prompt

Name : I

TC

Tree Copy

 

Copies a file tree from one directory to another. Arguments to the S o u r c e and D e s t i n a t i o n fields must be devices or directories. For example,

Source :

:RAM.1

Destination :

:RAM.2

will make a duplicate copy of all files from RAM card 1 to RAM card 2.

The source area cannot be part of the destination area.

NM

Name Match

 

Sets up a match string restricting access to files in the current directory to those that match the string. For example, setting

Name : *.bas

Will catalogue only files with a bas extension. The default match string is *, matching all file names. When a name match other than * is active, the symbol NM will be displayed at the left-hand end of the Filer DIRECTORY window

VF

View File

 

When this command is issued, the user is prompted for the file name.

enter filename
enter filename

web analytics