CPMCP

Section: User commands (1)
Updated: June 16, 2008

Index   Return to Main Contents   Disclaimer  


  NAME cpmcp - copy files from and to CP/M disks.

  SYNOPSIS

cpmcp [-f format] [-p] [-t] image user:file file

cpmcp [-f format] [-p] [-t] image user:file ... directory

cpmcp [-f format] [-p] [-t] image file user:file

cpmcp [-f format] [-p] [-t] image file ... user:

  DESCRIPTION

Cpmcp copies one or more files to or from a CP/M disk.

When copying multiple files, the last argument must be a drive or directory. The drive letter does not matter because the device is specified by the image, it is only used to specify which direction you want to copy. The user number is specified after the drive letter, if omitted user 0 is used.

You can use * and ? as "wildcards" in CP/M file names, which have the same meaning in unix-like shells, and also on the MS-DOS and Windows command lines for file name patterns.

  OPTIONS

-f
Use the given CP/M disk format instead of the default format.

For Apple II CP/M 80 users the disk image formats apple-do and apple-po are available. These are DOS3.3 order and ProDOS order disk image formats respectively, and must always be specified using the form -f apple-do or -f apple-po.

-p
Preserve time stamps when copying files from CP/M to UNIX (not implemented for copying the other way so far).

-t
Convert text files between CP/M and UNIX conventions.
Examples:

The following example shows how to copy a file from an Apple II DOS 3.3 order cpm disk image to the current directory:

cpmcp -f apple-do exmplcpm.dsk bhead.c 0:bhead.c

The following example shows how to copy a file to an Apple II DOS 3.3 order cpm disk image from the current directory:

cpmcp -f apple-do exmplcpm.dsk 0:bhead.c bhead.c

  RETURN VALUE - Upon successful completion, exit code 0 is returned.

This will likely only be of interest to programmers. In a Win32 system the exit code can be trapped in a batch file as an "ERRORLEVEL" or as a return value when run from another Win32 console program written in a language like C.

  ERRORS - Any errors are indicated by exit code 1.

This will likely only be of interest to programmers. In a Win32 system the exit code can be trapped in a batch file as an "ERRORLEVEL" or as a return value when run from another Win32 console program written in a language like C.

  FILES - diskdefs - CP/M disk format definitions

The diskdefs file is a plain ascii text file that serves as a database of disk and disk image format definitions. It can be reviewed for available CP/M formats and their names. For Apple II CP/M 80 users the disk image formats apple-do and apple-po are available.

The possible locations where cpmtools first looks for the diskdefs file:

- Can vary depending on the preferences of the person who builds the cpmtools binaries (executables) from the source code.

- The location is also installation dependent and the diskdefs file may also have been renamed.

If it's not found the current (work) directory is then searched for a file called diskdefs.

On a unix-like system, a ${prefix}/share/ style path like /usr/local/share/ is a possible place that cpmtools will first look for diskdefs.

In a Win32 system sometimes unix-like shells like cygwin are used to run cpmtools instead of Windows cmd. For those installations unix-like conventions probably apply.

For cpmtools installations targetted at the average Windows user who does not have a unix-like shell and uses the Windows cmd prompt to run cpmtools there is no standard shared place that cpmtools will first look for diskdefs. Pathed File names like \cpm\diskdefs or even c:\cpmtools\diskdefs are possible.

  AUTHORS

This program is copyright 1997-2008 Michael Haardt <michael@moria.de>. The Windows port is copyright 2000, 2001 John Elliott <jce@seasip.demon.co.uk>.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

  SEE ALSO

cmpls(1), cpm(5)


 Index

NAME cpmcp - copy files from and to CP/M disks.
SYNOPSIS
DESCRIPTION
OPTIONS
RETURN VALUE
ERRORS
FILES
AUTHORS
SEE ALSO

Gradus ad Parnassum

An ugly version of this document was initially created by man2html on November 14, 2008 using the cpmtools version 2.8 manual pages then edited and reformatted by hand by Bill Buckels.

Caveat Emptor

The contents of this document are either part of cpmtools or provide additional information about using cmptools. You can redistribute it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Bill Buckels has no warranty obligations or liability resulting from this document's use in any way whatsoever. If you don't agree then don't read it.