Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!attcan!lsuc!ncrcan!brambo!sid From: sid@brambo.UUCP (Sid Van den Heede) Newsgroups: comp.sys.ibm.pc Subject: Re: An MS-DOS Fright Message-ID: <556@brambo.UUCP> Date: 27 Mar 89 21:01:45 GMT References: <5826@homxc.ATT.COM> <976@necis.UUCP> Reply-To: sid@brambo.UUCP (Sid Van den Heede) Organization: Bramalea Software Inc., Bramalea, Ont. Lines: 49 In article <976@necis.UUCP> rbono@necis.UUCP (Rich Bono) writes: >In article <5826@homxc.ATT.COM>, gauss@homxc.ATT.COM (E.GAUSS) writes: >> >> While this may be documented somewhere, I have not seen it. If your >> finger strays to the next key and you type >> >> del */wrk >> >> instead of >> >> del *.wrk >> >> MS-DOS apparently deletes all files except those with an extension of .wrk! > > I tried this in MS-DOS 3.30 and MS-DOS 4.01 and this action >responds with an error message in both cases... NO FILES WERE DELETED >in either case. > > Do you have some sort of TSR loaded? Or some other "DOS enhancer"? > >Or what version of DOS are you using? No magic here! (or is that :-)?) First, the "/wrk" is a command line option (ie, switch) that the command can choose to use or ignore or whatever. So, you simply told del to delete all files that match the wildcard "*", that is, all files with *no* extension. Your command would also not delete files with an extension of .wak, or .nfg, or ... You might as well have typed "del *". Forget TSRs and DOS enhancers...The only thing that is relevant here is the revision of DOS. I tried this on three versions, and got three different results (:-) again?). The del command with DOS 2.11 didn't care about the switch(es) "/wrk"... It just deleted everything that matched the wildcard. The del with DOS 3.30 complained with "Invalid parameter"...Glad I didn't give it a complex command line...Which parameter? Well, it seems Microsoft improved things with 4.0. That version said "Invalid switch - /wrk" (thank you!). Sorry for the long response...First, I have a version of software that won't let me post if the included text is more than new stuff :-). Second, I thought a lecture on switches might be appropriate, since at least a couple of people have forgotten this fundamental MS-DOS feature.