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

CPM weird erase problem - assistance requested

265 views
Skip to first unread message

sunnyboy010101

unread,
Jan 6, 2020, 8:03:15 PM1/6/20
to
I managed to inadvertantly create several lowercase named files on my CP/M 2.2. disk. If I type DIR, I can see them (i.e. test.c) but if I try and erase them (i.e. ERA test.c) it says "NO FILE".

I can see the problem is that if I type lowercase filenames, CP/M coverts them to uppercase and uses that as the file name. But in this case I managed to get actual lowercase filenames.

Short of ERA *.* (which is not really an option at this time), is there a way to somehow indicate the lowercase file and erase it?

dxforth

unread,
Jan 6, 2020, 8:55:00 PM1/6/20
to
I had the same problem but can't recall how I resolved it. Have you
tried to delete or rename using the NSWP file manager utility?

Douglas Miller

unread,
Jan 6, 2020, 8:57:47 PM1/6/20
to
Depending on how many of these files you have to delete, you can use DDT/SID to throw together an ad-hoc erase program or you can write a small program to go through all the files and delete them. Basically, you can create an FCB with lower-case letters in the names and then call BDOS function 19 to delete them, one at a time.

From DDT/SID it's a pretty simple piece of code, using the assemble ("A100") command:

lxi d,180
mvi c,13
call 5
rst 7

and then use the substitute command ("S180") to fill in the FCB (file names) at 180. You'll want to make sure that the area is initially zero, then put the drive code at 180 (1=A...), the file name at 181-188, and the type at 189-18b. Then go: "G100". Repeat for each file.

Lyndon

unread,
Jan 6, 2020, 8:58:16 PM1/6/20
to
NSWEEP will be able to erase or rename the file no problem...

sunnyboy010101

unread,
Jan 6, 2020, 9:47:41 PM1/6/20
to
THANK YOU! I did a quick google search on NSWP.COM and found it here:

http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/enterprs/cpm/cpmug/directry/

direct download: http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/enterprs/cpm/cpmug/directry/nswp.com


and documentation here: http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/fog/starter/nsweep.doc

After a quick read through the manual (it says nsweep but it's for nswp) I was able to easily remove the files in question. Brilliant! Thanks again.
-S

sunnyboy010101

unread,
Jan 6, 2020, 9:50:00 PM1/6/20
to
Excellent advice. Thanks. I'm not 'good enough' with assembler yet to try this 'unsupervised', so I found the nswp (nsweep) program and used that. All I've been able to do myself in assembler was to create an 8080 'subroutine' that I could call from FORTRAN (M80) to turn on a set of LEDS attached to one port. I'm more of a FORTRAN or C programmer (plus other more modern languages) and was always working on so many different machines that it was never worth the time to learn assembler for them all.

sunnyboy010101

unread,
Jan 6, 2020, 9:50:26 PM1/6/20
to
Yes, Thanks.

dxforth

unread,
Jan 6, 2020, 11:06:29 PM1/6/20
to
On Tuesday, January 7, 2020 at 12:58:16 PM UTC+11, Lyndon wrote:
> ...
> NSWEEP will be able to erase or rename the file no problem...

Well, now I am confused as I just created an empty file in
lower-case and NSWP doesn't see it while DIR does!

Almost certain I've used it before in the same environment -
MYZ80 CP/M2 or CP/M3 it's the same. SD doesn't see it either.
I've checked the disk dir entry and see no issues:

00003480 00 46 52 45 44 20 20 20 20 20 20 20 00 00 00 00 .FRED ....
00003490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000034A0 00 66 52 65 64 20 20 20 20 74 79 70 00 00 00 00 .fRed typ....
000034B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

dxforth

unread,
Jan 6, 2020, 11:43:28 PM1/6/20
to
On Tuesday, January 7, 2020 at 3:06:29 PM UTC+11, dxforth wrote:
> On Tuesday, January 7, 2020 at 12:58:16 PM UTC+11, Lyndon wrote:
> > ...
> > NSWEEP will be able to erase or rename the file no problem...
>
> Well, now I am confused as I just created an empty file in
> lower-case and NSWP doesn't see it while DIR does!

User error! The file was at the bottom of the list due to the
ascii sort. Being a HD disk with lots of files I didn't think
to look that far.

Dennis Boone

unread,
Jan 7, 2020, 1:22:52 AM1/7/20
to
> I managed to inadvertantly create several lowercase named files on my
> CP/M 2.2. disk. If I type DIR, I can see them (i.e. test.c) but if I
> try and erase them (i.e. ERA test.c) it says "NO FILE".

I seem to recall being able to create mixed case names from basic programs.

De

Udo Munk

unread,
Jan 7, 2020, 1:46:12 AM1/7/20
to
Microsoft BASIC has this feature/bug, but can be used to remove or rename such files,
e.g. KILL "d:test.bas".

Richard Deane

unread,
Jan 7, 2020, 3:21:36 AM1/7/20
to
I find the program "Power" very good for handling files with incorrectly cased names, and with blank names
Richard

sunnyboy010101

unread,
Jan 7, 2020, 11:22:00 AM1/7/20
to
Yes. In my case it was UNZIP18 that will happily unzip lowercase filenames. I did not know that going in, so zipped up a C source project on my Win7 PC using winzip (no compression!) with LC filenames. Once discovered, it was easy to rename the files and re-zip the project.

It's definitely nice to be able to use a modern tool to zip files on one machine and then unzip them on the CP/M machine. I did the same with the C compiler, as it's quite a few files and would have been a royal pain to copy one at a time.

sunnyboy010101

unread,
Jan 7, 2020, 11:25:50 AM1/7/20
to
On Tuesday, January 7, 2020 at 12:21:36 AM UTC-8, Richard Deane wrote:
> I find the program "Power" very good for handling files with incorrectly cased names, and with blank names
> Richard

I tried "power", but had no manual so didn't know what exactly to do with it when it was running. Sadly, I never really used CP/M back when it was popular. My computers then were all TRS-80s, so the Aparat NewDOS was the program I used most (TRSDOS was really... not the greatest, IMO). My last machine of that vintage was a TRS80 Model 4P with double-sided panasonic disk drives (self installed) and full memory. It was capable of running CP/M, and I even had CP/M for it, but by that time I was more familiar with NewDOS for getting work done and so never really explored it.

Plus the PC had come out and we were starting to use those at work...

Richard Deane

unread,
Jan 7, 2020, 12:47:37 PM1/7/20
to
Power! by Pavel Breder is available from http://www.z80.eu/power.html where there is also a text-readable hlp file (in German :) but I guess Google could do a fair try at translation if you need it)

norwe...@gmail.com

unread,
Jan 7, 2020, 1:08:41 PM1/7/20
to
On Monday, January 6, 2020 at 5:03:15 PM UTC-8, sunnyboy010101 wrote:

<snip>

> Short of ERA *.* (which is not really an option at this time), is there a way to somehow indicate the lowercase file and erase it?

Get to know "DU". Very handy for manipulating disk raw sectors .... but be careful. You can *really* hurt yourself!!!

Roger


0 new messages