delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/2003/09/27/00:34:02

X-Authentication-Warning: delorie.com: mail set sender to opendos-bounces using -f
From: shadow AT shadowgard DOT com
To: opendos AT delorie DOT com
Date: Fri, 26 Sep 2003 20:56:38 -0700
MIME-Version: 1.0
Subject: Re: confirm before over-write
Message-ID: <3F74A806.30284.AB8785C@localhost>
References: <3F7473D7 DOT 30780 DOT 9F1A1BC AT localhost>
In-reply-to: <Pine.GSO.4.56.0309271106270.2035@jedi.apana.org.au>
X-mailer: Pegasus Mail for Windows (v4.02)
Reply-To: opendos AT delorie DOT com

On 27 Sep 2003 at 12:10, DONALD PEDDER wrote:

> > >    I haven't used replace before. I see that you can specify to
> > >    only write
> > > files that don't exist, but then you'd have to use the command
> > > again if you DO want to replace some existing files.
> >
> > Yes, but that's not an unreasonable thing to do.
> 
>    I disagree - having to use 2 commands instead of one makes things
> unnecessarily complicated and time-consuming. The purpose of an OS it
> to make it easy to use the computer (otherwise everyone would have to
> know assembler in order to operate their computer), so why then
> deliberately make the commands difficult to use? This defeats the
> purpose of having an OS.

Well, given the *purpose* of replace, it's not unreasonable.

After all, you can just write a batch file that uses wildcards 
to give you the functionality you want.

We did that with Format back in the old DOS days. Renamed 
Format to something else and created a FORMAT.BAT that 
wouldn't accept a Format C:. 
 
> > >    Copy or xcopy would be good. I have no idea why confirm would
> > >    be turned
> > > off by default - that makes no sense (it's one of the things I
> > > don't like about Unix too - you can overwrite/remove something you
> > > didn't intend to with a typo).
> >
> > Because anybody using the commandline is expected to know what they
> > are doing.
> 
>    I know what I'm doing, but like most humans, my memory is fallible,
>    my
> fingers sometimes unco-ordinated. I might use a filename which I've
> already used, and thus un-intentionally blast away a file I wasn't
> done with, or do the same thing by mis-typing a letter. I'm a
> human-being, with human flaws, not a robot.
>    The single most important aspect in programming is error-checking,
> which is making sure the user did the right thing with their input!
> Apparently the DR-DOS programmers don't mind us accidentally trashing
> our files.

See my comments below about having to maintain compatability 
with *old* batch files.
 
> > Xcopy is a real pain as the command options vary so drastically
> > between versions. To give anything but the most basic commands
> > requires knowing which OS & version you've got.
> 
>    For one person with one computer writing files for their own use
>    (the
> scenario that DOS was designed for), this isn't a problem.

You mised my point. Due to the options being different, I 
can't give you the command line that'll do what you want 
without knowing what you are running. 
 
> > With Copy, confirm is off by default because older versions of
> > MS-DOS and PC-DOS didn't *have* a confirm option. So having it
> > enabled by default would break a *lot* of batch files and other
> > things.
> 
>    So provide an option to turn it on - it can't even be turned on!
>    Most
> users don't even HAVE any batch files, never mind lots. Only a handful
> actually go as far as doing some programming of their computer.

Most users don't use copy anymore. They use Windows Explorer.

Most *customers* (in terms of dollars spent) for DR-DOS and 
other command line interpreters these days (and from the 
almost the beginning) are *commercial* users. They *do* need 
that compatability.

>    The above argument is like saying "we've put a turbo in your car,
>    but
> we won't let you use it because older cars might break down trying to
> keep up with you". Why then did I get a turbo? More to the point, why
> did I get a turbo that not only is off by default, but can't even be
> switched on?

Again, the majority of the *sales* are to *commercial* users 
who *demand* that compatability.
 
> > Trust me, I've had to deal with install files and the like that are
> > *ancient* (because they had to work on things like DOS 2.1 or 3.0).
> > And getting them to work with options set to behave differently can
> > take *hours*.
> >
> > So consider what that'd mean to companies that may have hundreds or
> > thousands of such files to "fix".
> 
>    What about the personal users, for whom the personal computer and
>    DOS
> were designed for? Shouldn't they be the number one priority? Most
> companies use NT or Unix, not DOS (Novell servers run on DOS, and
> that's about it).

Sorry, but back when "personal" users where the majority, DOS 
didn't exist. And command.com was an *example* command 
processor shell. It wasn't expected that it'd be more than a 
stopgap when it was written. And by the time it was clear that 
it had become a standard, compatability *had* to be 
maintained.

command.com was a "freebie" utility thrown in with the OS. And 
has all the flaws of such.

>    If you're working for a company, you're working for a company - you
> get paid for the hours you spend doing stuff. Doing something for
> YOURSELF goes unpaid though, not to mention no amount of hours can
> recover an overwritten file (only deleted ones can be recovered).

That's what backups are for. 
 
> > Thus, the defaults on any "old" commands will be
> > such that they are compatible with the oldest
> > version of DOS that is likely to still be used.
> > Which for some rather common things (especially the
> > sort of "embedded" systems that are the main target
> > of DR-DOS these days) can be as old as DOS 3.1.
> 
>    The problem isn't just that it's not the default, but that it can't
> even be switched on! No confirm, no option. At least in Unix you can
> switch it on! This is a pretty fatal flaw in an OS which is aimed at
> personal users.

Except that it was *never* aimed at personal users.  

> > Personally, my advice is to use DR-DOS as the OS, and 4dos as the
> > command processor.
> 
>    So, I have to use 2 OS's because one couldn't be bothered
>    maintaining a
> common option?

4dos is *not* an OS. It's a replacement for the Shell 
(command.com). The name is a pun on "for dos". 

> One which was put there because people DO forget
> things, and DO make typo's. Are we all expected to be Automatons now?
> I'm sorry - I know more about computers than most people I know (and I
> work in IT), but I still have human flaws. I still forget things and
> make typo's. 

It's not a "common option" in *any* version of command.com. 

Remember, the OS and the command processor are two *different* 
things. 

> The OS should be set-up to deal with that (God knows
> Windows comes up with a million "are you sure?" boxes).

It's not the OS that's the problem. It's command.com. There 
are at least 4 other shells for DOS. Three of them are ports 
of various Unix shells. The other one is 4dos. Which does what 
you want and more, and works with most versions of DOS from 
3.something on up. And has other advantages (like maximizing 
conventional ram available to applications.

Check it out at http://www.jpsoft.com. You can download it and 
try it free for 21 days (of use, not calendar days). After 
that it starts getting sort of crippled. 

--
Leonard Erickson (aka shadow)
shadow at krypton dot rain dot com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019