[Coco] 'arc' copy command and Stack Overflow (ERROR #207)

Allen Huffman alsplace at pobox.com
Tue Jan 27 10:10:33 EST 2015


> On Jan 27, 2015, at 6:58 AM, Gene Heskett <gheskett at wdtv.com> wrote:
> 
> I objected to the dsave changes that were made, many years ago now, 
> because it broke existing usage.  But once you get used to it, it does 
> work better.

I noticed dsave has support to create a .dsk image (VERY cool). What else changed?

>  But it took me a decade to get used to it. But I did get 
> extremely frustrated with another of our utilities that dsave uses, 
> makdir, erroring out if the directory already existed. So I fixed makdir 
> so that it now longer outputs the error if its an already exist error.
> To me, if the directory already exists, the object has been accomplished 
> and no error need be reported, so now dsave can be run in a mode that does 
> stop on a real error.  However, rather than having it shell out, where 
> that would work, I find it more convenient to save its output as a script, 
> edit if needed, and run the script.

Ah, yes, BUT...

I have an issue with telling a program/command to make something and it already being there and it not telling me. If I want to do:

makdir /sd1/BACKUP
arc /sd0/mystuff /sd1/BACKUP

...and makdir doesn't say "Uh, you already have one there. Maybe you don't want to copy stuff in to this pre-existing directory" that could lead to a mess.

SDC-DOS for CoCoSDC has the same issue with creating disk images. If it's already there, no error:

DRIVE 1,"COCOMAX3.DSK",NEW
BACKUP 0 TO 1

Whooops! I already had a "COCOMAX3.DSK" image and just erased it with the new one, with no warning, 'cause I didn't remember that 100 disks ago I had another CM3 disks with other pictures on it. (GRRR, I did this a half dozen or more times that I *know* during my floppy backup, and possibly many more I didn't know.)

If the original makdir did not return an error, so be it -- we should have kept it "official" for compatibility, and allowed users to swap out alternate commands if they wished (like we all did in the original OS-9 L2 days). But, if I had to choose, I'd want the error.

Then, the solution would be, adding an option that either says "warn me if it exists" or "don't warn me if it exists" much like how copy commands have a -r overwrite option or whatever.

Best thing today -- WE HAVE SOURCES and can change and make new stuff! Heavenly!

		-- A


More information about the Coco mailing list