CpmFS Version 0.04

It’s bigger. It’s better. It’s cooler. Here’s why …

CpmFS Version 0.04 allows wildcards in useful places. Instead of copying files individually, you can do a whole set (or all) in a single command. This makes moving files between disks (images) a whole lot easier.

It looks like this

C:\Test>dir
 Volume in drive C is OS
 Volume Serial Number is C2B8-A798

 Directory of C:\Test

16-Dec-17  10:19    <DIR>          .
16-Dec-17  10:19    <DIR>          ..
15-Dec-17  17:39            98,028 cpmfs.exe
15-Dec-17  17:39           256,256 drivea.dsk
               2 File(s)        354,284 bytes
               2 Dir(s)  83,432,783,872 bytes free

C:\Test>cpmfs drivea.dsk r "*.*" x
OK.

C:\Test>dir
 Volume in drive C is OS
 Volume Serial Number is C2B8-A798

 Directory of C:\Test

16-Dec-17  17:17    <DIR>          .
16-Dec-17  17:17    <DIR>          ..
15-Dec-17  17:39            98,028 cpmfs.exe
15-Dec-17  17:39           256,256 drivea.dsk
16-Dec-17  17:17    <DIR>          x
               2 File(s)        354,284 bytes
               3 Dir(s)  83,432,640,512 bytes free

C:\Test>dir x
 Volume in drive C is OS
 Volume Serial Number is C2B8-A798

 Directory of C:\Test\x

16-Dec-17  17:17    <DIR>          .
16-Dec-17  17:17    <DIR>          ..
16-Dec-17  17:17            19,456 BASIC.COM
16-Dec-17  17:17             2,304 BATCH.COM
16-Dec-17  17:17            12,672 CDOS.COM
16-Dec-17  17:17            29,952 CDOSGEN.COM
16-Dec-17  17:17               128 CLS.COM
16-Dec-17  17:17             1,792 DUMP.COM
16-Dec-17  17:17             7,168 EDIT.COM
16-Dec-17  17:17             9,600 INIT.COM
16-Dec-17  17:17             4,352 RDOS.COM
16-Dec-17  17:17             9,216 STAT.COM
16-Dec-17  17:17            10,496 WM.COM
16-Dec-17  17:17             2,944 WM.HLP
16-Dec-17  17:17             1,024 WRTSYS.COM
16-Dec-17  17:17             3,584 XFER.COM
              14 File(s)        114,688 bytes
               2 Dir(s)  83,432,640,512 bytes free

C:\Test>

That copies all of the files on the disk into an “x” directory, creating the directory if it doesn’t already exist.

They are now Windows files in a Windows directory and you can copy, delete, ZIP, email, disassemble, etc them; just like any other Windows file. Open the directory in Windows Explorer. You’ll see the files.

Putting them on another disk (image) is just as simple:

C:\Test>cpmfs -t 8 newdisk.dsk make
OK.

C:\Test>dir newdisk.dsk
 Volume in drive C is OS
 Volume Serial Number is C2B8-A798

 Directory of C:\Test

16-Dec-17  17:24           256,256 newdisk.dsk
               1 File(s)        256,256 bytes
               0 Dir(s)  83,431,510,016 bytes free

C:\Test>cpmfs newdisk.dsk w x\c*.com
OK.

C:\Test>cpmfs newdisk.dsk dir
CDOS.COM
CDOSGEN.COM
CLS.COM

C:\Test>

Note: you need to quote an ambiguous file reference like *.* if you mean CP/M files within the image. If you don’t quote it, the reference will be expanded by the Windows program to match files in the current Windows directory. You can see me using it with and without quotes in the examples above.

You can also delete sets of files in a single go. Note: there isn’t a confirm (Are you sure?) required, even for *.*. We believe you. It’s a disk image. You’re likely to have a copy somewhere if it comes to that.

The new “ren” (rename) command is because “r” and “w” are no longer compatible with how they used to work. You used to be able to do:

cpmfs image.dsk r cpmfn winfn
cpmfs image.dsk w cpmfn winfn

You could change a filename during the transfer. I mostly used that to copy files to or from a different Windows directory when the image.dsk file was in the current one. That functionality is now built in. The cpmfs programs knows there isn’t a directory tree within CP/M; so it strips out path names before looking for, or creating, a file in a CP/M directory. I also find it more useful to be able to specify one, two, three or more files to write to the CP/M disk image. If the two filenames case was taken up by the, far less used, “and rename it to” case; we can’t do that. So the SYNTAX for “r” and “w” HAS CHANGED.

You now have:
– ‘cpmfs image.dsk r “afn” [dir]’ to read one, more, or all files (that match afn – an ambiguous file name) to the current, or any other, directory. As a CP/M user you should already be familiar with afns. A ‘?’ matches any character. A ‘*’ matches 0 or more characters.
– ‘cpmfs image.dsk w [path\]afn1 [[path2\]afn2 …] to write any combination of files to the disk image in one go.

The “ren” command looks like this:

C:\Test>cpmfs newdisk.dsk ren cdosgen.com mk-cdos.com
OK.

C:\Test>cpmfs newdisk.dsk dir
CDOS.COM
CLS.COM
MK-CDOS.COM

C:\Test>


That’s using a Windows style rename. If you prefer CP/M style, the usage message doesn’t mention it but, you can do ‘cpmfs image.dsk ren new = old’. It has to be as three separate words: the new-file-name, the equals sign, and the existing(old)-file-name. You can’t squash it all together like in ‘PIP new=old’, sorry.

By the way, you may have already noticed, the directories (‘cpmfs … dir’) are now sorted into alphabetic order. It’s a little thing but it makes it easier to see if a file is present or not.

You can also add a ‘patn’ (per the usage message and meaning pattern) after the dir command. This is an ambiguous file name, just like any other. We are talking about CP/M files so you need to put it in quotes to prevent the cpmfs Windows program automatically expanding it in a Windows context. Here’s an example:

C:\Test>cpmfs newdisk.dsk dir "c*.*"
CDOS.COM
CLS.COM

C:\Test>


Remember, we renamed CDOSGEN to start with M, so that doesn’t appear in a DIR of files starting with C.

The only other change is, you can leave off the filename for rsys and wsys and it will default to sysarea.sys in the current directory. It’s probably not the most useful feature but it might save some typing sometimes.

This is part of the CP/M topic.

It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUponDigg thisPin on PinterestEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *