{"id":1795,"date":"2017-12-16T11:22:13","date_gmt":"2017-12-16T11:22:13","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=1795"},"modified":"2018-11-10T23:06:31","modified_gmt":"2018-11-10T23:06:31","slug":"cpmfs-version-0-04","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/1795\/cpmfs-version-0-04\/","title":{"rendered":"CpmFS Version 0.04"},"content":{"rendered":"<p>It&#8217;s bigger. It&#8217;s better. It&#8217;s cooler. Here&#8217;s why &#8230;<!--more--><\/p>\n<p><a href=\"http:\/\/www.sydneysmith.com\/wordpress\/cpmfs\/\">CpmFS<\/a> 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.<\/p>\n<p>It looks like this<br \/>\n<code><\/p>\n<pre>\r\nC:\\Test>dir\r\n Volume in drive C is OS\r\n Volume Serial Number is C2B8-A798\r\n\r\n Directory of C:\\Test\r\n\r\n16-Dec-17  10:19    &lt;DIR>          .\r\n16-Dec-17  10:19    &lt;DIR>          ..\r\n15-Dec-17  17:39            98,028 cpmfs.exe\r\n15-Dec-17  17:39           256,256 drivea.dsk\r\n               2 File(s)        354,284 bytes\r\n               2 Dir(s)  83,432,783,872 bytes free\r\n\r\nC:\\Test>cpmfs drivea.dsk r \"*.*\" x\r\nOK.\r\n\r\nC:\\Test>dir\r\n Volume in drive C is OS\r\n Volume Serial Number is C2B8-A798\r\n\r\n Directory of C:\\Test\r\n\r\n16-Dec-17  17:17    &lt;DIR>          .\r\n16-Dec-17  17:17    &lt;DIR>          ..\r\n15-Dec-17  17:39            98,028 cpmfs.exe\r\n15-Dec-17  17:39           256,256 drivea.dsk\r\n16-Dec-17  17:17    &lt;DIR>          x\r\n               2 File(s)        354,284 bytes\r\n               3 Dir(s)  83,432,640,512 bytes free\r\n\r\nC:\\Test>dir x\r\n Volume in drive C is OS\r\n Volume Serial Number is C2B8-A798\r\n\r\n Directory of C:\\Test\\x\r\n\r\n16-Dec-17  17:17    &lt;DIR>          .\r\n16-Dec-17  17:17    &lt;DIR>          ..\r\n16-Dec-17  17:17            19,456 BASIC.COM\r\n16-Dec-17  17:17             2,304 BATCH.COM\r\n16-Dec-17  17:17            12,672 CDOS.COM\r\n16-Dec-17  17:17            29,952 CDOSGEN.COM\r\n16-Dec-17  17:17               128 CLS.COM\r\n16-Dec-17  17:17             1,792 DUMP.COM\r\n16-Dec-17  17:17             7,168 EDIT.COM\r\n16-Dec-17  17:17             9,600 INIT.COM\r\n16-Dec-17  17:17             4,352 RDOS.COM\r\n16-Dec-17  17:17             9,216 STAT.COM\r\n16-Dec-17  17:17            10,496 WM.COM\r\n16-Dec-17  17:17             2,944 WM.HLP\r\n16-Dec-17  17:17             1,024 WRTSYS.COM\r\n16-Dec-17  17:17             3,584 XFER.COM\r\n              14 File(s)        114,688 bytes\r\n               2 Dir(s)  83,432,640,512 bytes free\r\n\r\nC:\\Test>\r\n\r\n<\/pre>\n<p><\/code><\/p>\n<p>That copies all of the files on the disk into an &#8220;x&#8221; directory, creating the directory if it doesn&#8217;t already exist.<\/p>\n<p>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&#8217;ll see the files.<\/p>\n<p>Putting them on another disk (image) is just as simple:<br \/>\n<code><\/p>\n<pre>\r\nC:\\Test>cpmfs -t 8 newdisk.dsk make\r\nOK.\r\n\r\nC:\\Test>dir newdisk.dsk\r\n Volume in drive C is OS\r\n Volume Serial Number is C2B8-A798\r\n\r\n Directory of C:\\Test\r\n\r\n16-Dec-17  17:24           256,256 newdisk.dsk\r\n               1 File(s)        256,256 bytes\r\n               0 Dir(s)  83,431,510,016 bytes free\r\n\r\nC:\\Test>cpmfs newdisk.dsk w x\\c*.com\r\nOK.\r\n\r\nC:\\Test>cpmfs newdisk.dsk dir\r\nCDOS.COM\r\nCDOSGEN.COM\r\nCLS.COM\r\n\r\nC:\\Test>\r\n<\/pre>\n<p><\/code><\/p>\n<p>Note: you need to quote an ambiguous file reference like *.* if you mean CP\/M files within the image. If you don&#8217;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.<\/p>\n<p>You can also delete sets of files in a single go. Note: there isn&#8217;t a confirm (Are you sure?) required, even for *.*. We believe you. It&#8217;s a disk image. You&#8217;re likely to have a copy somewhere if it comes to that.<\/p>\n<p>The new &#8220;ren&#8221; (rename) command is because &#8220;r&#8221; and &#8220;w&#8221; are no longer compatible with how they used to work. You used to be able to do:<br \/>\n<code><\/p>\n<pre>\r\ncpmfs image.dsk r cpmfn winfn\r\ncpmfs image.dsk w cpmfn winfn\r\n<\/pre>\n<p><\/code><\/p>\n<p>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&#8217;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, &#8220;and rename it to&#8221; case; we can&#8217;t do that. So the SYNTAX for &#8220;r&#8221; and &#8220;w&#8221; HAS CHANGED.<\/p>\n<p>You now have:<br \/>\n&#8211; &#8216;cpmfs image.dsk r &#8220;afn&#8221; [dir]&#8217; to read one, more, or all files (that match afn &#8211; an ambiguous file name) to the current, or any other, directory. As a CP\/M user you should already be familiar with afns. A &#8216;?&#8217; matches any character. A &#8216;*&#8217; matches 0 or more characters.<br \/>\n&#8211; &#8216;cpmfs image.dsk w [path\\]afn1 [[path2\\]afn2 &#8230;] to write any combination of files to the disk image in one go.<\/p>\n<p>The &#8220;ren&#8221; command looks like this:<br \/>\n<code><\/p>\n<pre>\r\nC:\\Test>cpmfs newdisk.dsk ren cdosgen.com mk-cdos.com\r\nOK.\r\n\r\nC:\\Test>cpmfs newdisk.dsk dir\r\nCDOS.COM\r\nCLS.COM\r\nMK-CDOS.COM\r\n\r\nC:\\Test>\r\n<\/pre>\n<p><\/code><br \/>\nThat&#8217;s using a Windows style rename. If you prefer CP\/M style, the usage message doesn&#8217;t mention it but, you can do &#8216;cpmfs image.dsk ren new = old&#8217;. It has to be as three separate words: the new-file-name, the equals sign, and the existing(old)-file-name. You can&#8217;t squash it all together like in &#8216;PIP new=old&#8217;, sorry.<\/p>\n<p>By the way, you may have already noticed, the directories (&#8216;cpmfs &#8230; dir&#8217;) are now sorted into alphabetic order. It&#8217;s a little thing but it makes it easier to see if a file is present or not.<\/p>\n<p>You can also add a &#8216;patn&#8217; (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&#8217;s an example:<br \/>\n<code><\/p>\n<pre>\r\nC:\\Test>cpmfs newdisk.dsk dir \"c*.*\"\r\nCDOS.COM\r\nCLS.COM\r\n\r\nC:\\Test>\r\n<\/pre>\n<p><\/code><br \/>\nRemember, we renamed CDOSGEN to start with M, so that doesn&#8217;t appear in a DIR of files starting with C.<\/p>\n<p>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&#8217;s probably not the most useful feature but it might save some typing sometimes.<\/p>\n<p>This is part of the <a href=\"http:\/\/www.sydneysmith.com\/wordpress\/cpm-programs\/\">CP\/M topic<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s bigger. It&#8217;s better. It&#8217;s cooler. Here&#8217;s why &#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,59],"tags":[75],"_links":{"self":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1795"}],"collection":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1795"}],"version-history":[{"count":7,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1795\/revisions"}],"predecessor-version":[{"id":1802,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1795\/revisions\/1802"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}