NAME
----
        CPCFS - CPCEmu Filesystem Maintenance           Version: 0.85

SYNOPSIS
--------
        CPCFS                   to invoke an interactive session
        CPCFS <commands> ...    to perform batch commands

DESCRIPTION
-----------
CPCFS is a program to copy files form a DOS filesystem to a
disk-image appropriate for CPCEmu, an emulator for the
CPC464/664/6128 homecomputer series by Amstrad.

Note:   This documentation is generated out of CPCFS' help file CPCFS.HLP.
        Some "See also"-hints can therefore be misleading!

INVOCATION
----------
Either call CPCFS in interactive mode:

        CPCFS

or in batch mode:

        CPCFS [image] <commands>...

where
  image is the name of the image on which <commands> should be applied
  <commands> are
        -g      get         :   -?      usage message
        -mg     mget        :   -f      toggle force
        -p      put         :   -b      binary mode
        -mp     mput        :   -t      text mode

                              -e      execute next commands
        <none>  dir         :
        -d      dir         :   -nd     Create a new data/system/vortex image.
        -s      stat        :   -ns     The imagename must immediately follow
        -x      source      :   -nv     this switch. (e.g. CPCFS -ND FOO)

Note: Options after -e are considered as options for CPCFS commands!
      Exitcodes are 0 (ok), 1 (error), or 2 (^C pressed)

Options are simply a shortcut for commands. The first argument can
be the name of an imagefile, all following arguments are commands.
If you omit a command and only give imagename ``dir'' is assumed.

Used environment variables:

        CPCFSHOME       directory for CPCFS.CFG and CPCFS.HLP, if differnet
                        from the directory where CPCFS.EXE resides.
        PAGER           command to use for paging (default: internal pager)
        TEMP            directory for temporary files (default: current)
        COMSPEC         specifies the standard command processor for DOS

PAGER must point to a program that expects its argument on the commandline,
and not from stdin, so MORE.COM does not work. V. Buergs's famous LIST does
not work the most time, I don't know why. I recommend LESS.

You can get a listing of all enviroment variables with !SET.
See your DOS manual for further documentation about TEMP and COMSPEC.

COMMANDS
--------
All commands are case insensitive. Some commands write an informational
message, if they are invoked without an argument (mode, open, page,
prompt, verbosity,...). Some commands have more names than one. You can
use the name that you like most.

List of available commands in alphabetical order:

!       ?       attrib  bye     cd      close   cls     comment copy    del
dir     dira    dpb     dump    echo    era     exit    force   format  get
help    lcd     ldir    map     mget    mode    mput    new     open    page
prompt  put     quit    ren     source  stat    sysgen  type    user  verbosity

Commands grouped according to functionality:

General:                close   open    user
Transfer data:          get     mget    mode    mput    put     sysgen
DOS access:             !       cd      lcd     ldir
CP/M maintenance:       attrib  copy    comment del     dir     dpb     dump
                        era     format  new     ren     stat    type
User interface:         ?       bye     cls     echo    exit    force   help
                        verbosity       page    prompt  quit    source
Obsolete:               dira    map

Standard options for several commands:
        * -c  output to console, when default is output to a pager
        * -f  force overwriting of existing files
        * -b  transfer in binary mode
        * -t  transfer in text mode (up to first Ctrl-Z)

The f, b, and t options control the copying process and are available for
        get     mget    put     mput    type    copy
The c option controls the display mode and is available for
        type    dump    stat

See also:
        variables (PAGER)       force   mode

GENERAL commands
================

OPEN <file>
        Load an image

Closes the one in memory, if any. It appends the string ".DSK" to the
DOS filename, if no extension is given.

CLOSE
        Close the current image

USER <number>[:]
        Set user area. <number> should be in 0 .. 15.
        The USER command itself can be left out.

Note: USER 229 does _not_ allow access to deleted files!

Example:
        USER 0                  back to default user
        USER 0:                 (additional colon possible)
        0:                      (shortcut form, colon required)

TRANSFER commands
=================

GET <options> <cpm-filename> [<dos-filename>]
        Copies a file from CPC to DOS filesystem. If <dos-filename> is
        present, <cpm-filename> is renamed while copying.
GET <options> <cpm-filename>... <dos-path>
        Copies some files form CPC to a DOS directory. <dos-path> must
        end with a backslash (otherwise GET ONE PATH would be ambigous)

Example:
        GET FOO                 copies to .\FOO
        GET FOO DOSFOO          copies to .\DOSFOO
        GET FOO BAR ..\         copies to ..\FOO and ..\BAR

See also:
        options         filenames

MGET <options> <cpm-filespec>...
        Same as GET, but works with wildcards instead of names (m = multiple)
        Renaming on the fly and getting to other directories is not
        possible here.

See also:
        options         filenames

PUT <options> <dos-filename> [<cpm-filename>]
        Copies a file from DOS to CPC filesystem. If <cpm-filename> is
        present, <dos-filename> is renamed to that name.
PUT <options> <dos-filename> <userarea>:
        Copies *one* file from DOS to a user area of the CP/M filesystem.
        The colon after <userarea> is important!

See also:
        options         filenames

MPUT <options> <dos-filespec>...
        Same as PUT, but works with wildcards instead of names (m = multiple).
        Renaming on the fly and putting to other user areas is not
        possible here.

See also:
        options         filenames

MODE <mode>
        Set transfer mode to either Binary, Text, or Auto.
          * Binary      the whole file is processed
          * Text        the file is processed up to the first Ctrl-Z
          * Auto        Binary or Text processing depends on the analysis
                        of the file (>70% printable => Text, otherwise Bin)

See also:
        options

Printable characters are newlines (10,13) and characters between space (32)
and tilde (126). <mode> can be abbreviated to its first character B, T, or A.

SYSGEN <file>
        Writes the CP/M-System from <file> to current image.

Note: The image must be in system format!

It only works, if the image was formatted with two system tracks (e.g.
system or vortex format). See STAT, if you want to know the format or
whether CP/M is already in the image.

To obtain a CP/M-image you can use the accompanying BASIC program
GETCPM.BAS. It runs on a CPC and copies the system tracks off a real CPC
disk to the file SYSTEM.CPM. Then transfer the file to DOS.

If you want to "sysgen" your vortex image, you must prepare CP/M first
(see your vortex documentation). WARNING: I do not own a vortex drive
nor its documentation, so I cannot tell if it works. Feedback is
highly appreciated!!!

DOS ACCESS commands
===================

!<command>
        Execute a DOS command or open a shell, if there is no <command>

See also:
        variables (COMSPEC)     ldir    cd

Executes the program <command> in a DOS-Shell. If only a "!" is
typed, CPCFS invokes the interactive shell given in the %COMSPEC%
environment variable or C:\COMMAND.COM if the variable isn't set. You
must type EXIT to return from the shell to CPCFS. Contrary to other
commands there is no space needed behind the "!".

CD <dos-drive&amp;path>
LCD <dos-dirve&amp;path>
        Change the current DOS drive and/or directory.
        This is *not* equivalent to !CD.

Example:
        CD C:\TEMP

The "L" in LCD (as well as in LDIR) reminds you, that this command
affects the local filesystem of DOS.

LDIR <dos-filespec>
        Print the current DOS directory.
        Equivalent to !DIR.

Example:
        LDIR *.DSK

See also:
        !

CP/M MAINTENANCE commands
{{{=========================

Informational


DIR <options> <cpm-filespec>

The amount of output: wide = name, size default = wide + user, R/O attribute, more-attributes-mark, alloc. entries long = default + all attrib., detected mode, alloc. blocks, alloc. records amshead = default + Amsdos Header

Note: -a, -l, and -w are mutually exclusive!

See also:

STAT

See also:

DPB

See also:

Record: the smallest piece of data accessible by CP/M (128 bytes) Block: the smallest allocation entity (1024 bytes, vortex: 4096 bytes) Directory: the first blocks of the filesystem Dir.entry: 32 bytes containing the filename and blockpointers Blockpointer: one or two bytes pointing to a block of data Extent: the amount of blockpointers pointing to 16k of data

COMMENT -d

COMMENT -n

COMMENT <string>

Example:

See also:

TYPE <options> <cpm-filename>

Example:

Options:

See also:

DUMP <options> -d Dump the complete directory structure DUMP <options> -m Dump an allocation map DUMP <options> [ -b# | -h# | -t# | -s# | -1 | -2 ] Dump some data blocks

Directory dump -- shows:

Allocation dump -- shows for each sector:

Data dump -- options:

Overall options:

Example:

Note: Options for DUMP can be packed, but this can be confusing

Changing files


NEW [ -s | -d | -i | -v ] <imagename> FORMAT ...

Note: To access a vortex image from a CPC emulator you need the vortex ROMS!

See also:

DEL [ -f ] <cpm-filespec>... ERA [ -f ] <cpm-filespec>...

Example:

REN <from-cpm-filespec> <to-cpm-filespec> REN <from-cpm-filespec>... <userarea>

Example:

REN uses the well-known DOS order for renaming (think of the word TO between the filenames) and not the (possibly expected) CP/M order (think of ":=" between the filenames)

ATTRIB <attributes>... <cpm-filespec>...

Attributes are:

Change the R/O, R/W, DIR, and SYS by simply mentioning them with prefixed "-". Set A and F1..F8 with -A=ON, -F1=OFF, etc.

Note: F5..F8 are officially reserved for CP/M!

Example:

COPY <options> <from-cpm-filename> <to-cpm-filename> COPY <options> <cpm-filespec>... <userarea>

Example:

See also:

USER INTERFACE comamnds =======================

# <any-text>

BYE EXIT QUIT

Quits CPCFS. You can hit Ctrl-Z to achieve the same purpose, only faster! (The Unix version uses Ctrl-D as shortcut for Quit)

HELP <topic>

The following special characters are used to describe the syntax

The following special identifier are used:

See also:

The startup helppage is:


Type

for information on that command or

on one of the following general topics:


SOURCE <scriptfile>

Example:

ECHO <string>

Note: Parameters of ANSI sequences must be separated by %s, and not ";"!

Example:

See also:

PROMPT <string>

Example:

See also:

CLS

FORCE

The Overwrite? question appears, if you try to overwrite DOS or CP/M files with PUT, GET, COPY, REN or if you try to DEL a readonly file.

To see the current Force status use STAT.

VERBOSITY <level>

Note: Verbosity level > 9 are for debugging purposes and require ANSI.SYS!

Example:

PAGE <lines>

See also:

CPCFS has an internal pager for commands like DUMP, TYPE, and so on. With the PAGE command you can set the number of lines of your screen (the default is 25). If you set PAGE 0, you bypass the internal pager and things are displayed without stops.

FILENAMES


DOS filenames: <drive>:<path>\<root>.<extension>

CP/M filenames: <userarea>:<root>.<extension> Wildcards:

Note: * may appear as user number => all users

Example: Files = {ABC.1, ABC.2, ABC.X, X.ABC, 1:USER.ONE}

EDITING


The following keystrokes are possible while editing a commandline:

The traditonal EMACS contol codes are also possible (B, F, V, D, ^H, A, E, P, N, K, U).

VALUES & PERCENT EXPANSION


Numbers: in C syntax, i.e. decimal, octal with leading "0",

Strings: Surrounded by `"'

See also:

Percent expansions can be used anywhere in strings. They are replaced by some runtime dependend values:

Some expansions show `#', if there is no image loaded!

Used in commands:

FILES


CPCFS.CFG

*.DSK

*.CPM

SEE ALSO


GETCPM.BAS, a Locomotive BASIC program to copy CP/M tracks off a diskette and save them to a file. Simply type it in your *original* CPC (you can leave out REMarks and PRINTs) and run it on a CP/M system disk. It creates a file, that you have to transfer in some way to DOS (read the CPCEmu documentation for various ways, how to arrange it). Finally use CPCFS' SYSGEN command to create a diskimage with CP/M.

DROPTAG.BAT, a batch file replacing DROPTAG.EXE of the former distribution.

RELATED WORKS


CPCEmu

CPE

comp.sys.amstrad.8bit

Webring

ftp://ftp.ibp.fr/pub/amstrad/amstrad.faq ftp://rtfm.mit.edu/pub/usenet/comp.sys.amstrad.8bit

BUGS


The following inconsistencies are intentional:

LEGAL STUFF


Copyright: CPCFS - CPCEmu Filessystem Maintenance, Version 0.85 (Feb. 96-Jan 98)

This program is Freeware and copyright by Derik van Zuetphen. You may distribute the whole package (zip-file), with or without an appropriate charge. You may not distribute changed versions.

** This software is provided "as-is". No warranties of any kind are made! **

Please send bug reports to

If you want to see any modification or supplements to CPCFS, contact me and I possibly include them in the distribution.

Trademarks:

AUTHOR


}}}

CPCFS/cpcfsdoc (last edited 2008-02-29 16:40:47 by localhost)