Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help with cpmtools

420 views
Skip to first unread message

Tom Lake

unread,
Jul 4, 2019, 7:05:16 AM7/4/19
to
I'm trying to copy a file called BASKEY.COM to a CP/M disk image called NEVADA.DSK. I use Windows 10. I've read the docs but it seems I don't understand them fully. Here's what I've tried:

cpmcp -f ibm-3740 nevada.dsk a:baskey.com baskey.com
Usage: 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:

cpmcp -f ibm-3740 nevada.dsk baskey.com baskey.com
Usage: 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:

cpmcp -f ibm-3740 nevada.dsk baskey.com a:baskey.com
Usage: 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:

What is the correct format I should be using?

Also, I tried to delete all the files from NEVADA.DSK this way:

D:\cpmtools>cpmrm -f ibm-3740 nevada.dsk *.*

Nothing gets deleted. I can delete individual files but a file pattern doesn't work. Is there a way to delete all files at once?

Udo Munk

unread,
Jul 4, 2019, 7:17:51 AM7/4/19
to
CP/M filenames have a user number besides the name, so the correct
syntax is:

cpmcp -f ibm-3740 nevada.dsk baskey.com 0:baskey.com

and

cpmrm -f ibm-3740 nevada.dsk 0:*.*

Lawrence Woodman

unread,
Jul 4, 2019, 3:04:43 PM7/4/19
to
You can even drop the filename after the 0: when copying to a disk image:

cpmcp -f ibm-3740 nevada.dsk baskey.com 0:


Lorry

---
https://techtinkering.com/articles/tag/cpm/
https://youtube.com/techtinkering (Lots of CP/M videos)
https://techtinkering.com/articles/mission-impossible-on-cpm/

Larry Kraemer

unread,
Jul 4, 2019, 7:20:02 PM7/4/19
to
The Linux commands I use as samples are:

cpmcp -f zor1 ZORBA1.RAW 0:*.COM /path/to/storage/directory
cpmcp -f zor1 ZORBA1.RAW 5:*.COM .
^ PERIOD meaning to current directory

cpmcp -f zor1 ZORBA1.RAW /path/to/files/copied/to/image/*.ASM 5:
cpmcp -f zor1 ZORBA1.RAW /path/to/files/copied/to/image/*.COM 0:
^ USER Areas 0 to 15 on the Image

Larry

Tom Lake

unread,
Jul 5, 2019, 10:31:48 AM7/5/19
to
Thanks for that.

Now my problem is copying all the files from a subdirectory of the cpmtools directory onto the disk
image

I tried

cpmcp -f ibm-3740 nevada.dsk *.* 0:mydir\

cpmcp -f ibm-3740 nevada.dsk *.* \0:mydir\

cpmcp -f ibm-3740 nevada.dsk *.* 0:\mydir

cpmcp -f ibm-3740 nevada.dsk *.* \0:mydir


Udo Munk

unread,
Jul 5, 2019, 11:01:16 AM7/5/19
to
On Friday, July 5, 2019 at 4:31:48 PM UTC+2, Tom Lake wrote:

> Now my problem is copying all the files from a subdirectory of
> the cpmtools directory onto the disk
> image
>
> I tried
>
> cpmcp -f ibm-3740 nevada.dsk *.* 0:mydir\
>
> cpmcp -f ibm-3740 nevada.dsk *.* \0:mydir\
>
> cpmcp -f ibm-3740 nevada.dsk *.* 0:\mydir
>
> cpmcp -f ibm-3740 nevada.dsk *.* \0:mydir

You try to specify a directory on a CP/M disk, but CP/M doesn't
support directories.

cd to the directory with the files and then do:

cpmcp -f ibm-3740 nevada.dsk * 0:

That will copy all files (*) to the image under CP/M user 0.

Tom Lake

unread,
Jul 5, 2019, 11:25:44 AM7/5/19
to
Here's what I get when I try that:

d:\cpmtools\mydir>cpmcp -f ibm-3740 nevada.dsk * 0:
cpmcp: invalid option -- M
Usage: 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:

I'm not even using an option M!

Tom L

Randy McLaughlin

unread,
Jul 5, 2019, 11:59:44 AM7/5/19
to
If there are subdirectories it is probably confusing it. Try *.* or make sure there are no subdirectories in your working directory.


Randy

Dennis Boone

unread,
Jul 5, 2019, 12:07:39 PM7/5/19
to
> d:\cpmtools\mydir>cpmcp -f ibm-3740 nevada.dsk * 0:
> cpmcp: invalid option -- M
> Usage: 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:

> I'm not even using an option M!

Sounds like there's a file in that directory whose name starts with -M.

De

Tom Lake

unread,
Jul 5, 2019, 12:16:58 PM7/5/19
to
Nope, no files that start with M.

Tom Lake

unread,
Jul 5, 2019, 12:17:58 PM7/5/19
to
No change

cpmcp -f ibm-3740 nevada.dsk *.* 0:

still fails with invalid option --M

Tom L

Martin

unread,
Jul 5, 2019, 2:46:04 PM7/5/19
to
If "M" wasn't a typo, Dennis meant "a file starting with a dash".

IMHO, there MUST be a filename somewhere starting with a dash!

try (without the quotation marks)
"echo *"
or
"echo *.*"

Since you use windows, use the variant echoing all files
(also those with extensions) in the following examples.

1) To avoid interpreting filenames starting with dashes as
options with possible desastrous effects,
most programs support the meta option "--" to stop interpreting
leading dashes.

I would suggest to place it in all commands supporting it before
any careless placed "*" or "*.*" as a precaution!


2) Better not create the disk image in the same directory!
This could result in some sort of "loop", cpmcp trying to copy
the disk image as a file into itself...

Use "..\nevada.dsk".

So after all, your command would look like
d:\cpmtools\mydir>cpmcp -f ibm-3740 ..\nevada.dsk -- * 0:
or
d:\cpmtools\mydir>cpmcp -f ibm-3740 ..\nevada.dsk -- *.* 0:


HTH
Martin


Tom Lake

unread,
Jul 5, 2019, 4:20:25 PM7/5/19
to
Yes, that was the problem. There was a file called -MASTER.012

Tom L

Dennis Boone

unread,
Jul 5, 2019, 5:08:14 PM7/5/19
to
> 1) To avoid interpreting filenames starting with dashes as
> options with possible desastrous effects,
> most programs support the meta option "--" to stop interpreting
> leading dashes.

I see cpmcp uses getopt(), so that should work.

De

Tom Lake

unread,
Jul 5, 2019, 9:16:58 PM7/5/19
to
Yup. It worked fine. Thank you all!!!
0 new messages