Dec 122017
 
Include EXCEPTIONS in DOS commands. (ex.: no dum.com erase *.* ).
File NO.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Include EXCEPTIONS in DOS commands. (ex.: no dum.com erase *.* ).
File Name File Size Zip Size Zip Type
NO.COM 736 674 deflated
NO.DOC 4608 1373 deflated

Download File NO.ZIP Here

Contents of the NO.DOC file


NO Charles Petzold
Command
Copyright (c) 1986, Ziff-Davis Publishing Co.
______________________________________________________

Purpose: Excludes specified files in a subdirectory
from the action of a command.

Format: NO filespec Command [parameter]

Remarks: NO.COM is designed for situations in which
you want to apply a command such as DELete or
COPY to all the files in a directory except
one or two (or a class of) files. For
example,

NO *.BAS COPY *.* A:

copies all the files in your current
subdirectory to drive A: except for those
that have a .BAS extension.

To exclude more than one file (or category)
you must use a separate NO command for each
on the command line. Thus,

NO *.ASM NO *.COM DEL *.*

deletes all files in the current directory
except those with .ASM or .COM extensions.

Notes:

1. NO.COM should not be used in conjunction
with the PC-DOS BACKUP and RESTORE
commands. This is because NO operates
by temporarily setting the "hidden" file
attribute bit on the files to be
excluded from the main command, then
unhiding the files after the main
command has been executed. Since the
DOS BACKUP/RESTORE operation acts on
hidden and unhidden files alike, NO.COM
cannot be used to exclude files from
BACKUP/RESTORE. RESTORE, indeed, will

restore the supposedly excluded files as
hidden, overwriting the originals.

2. While NO.COM provides full path support
(and so requires the use of DOS 2.0 or
later), it is a good policy when using
NO to use CHDIR to make the directory
that contains the files on which you
wish to operate the current directory.

For example, suppose you are in your
root directory, one of whose subdirec-
tories is \BASIC. If you were to enter
the command

NO *.BAS DEL \BASIC\*.*

Page -1-

you would not delete all the files in
the \BASIC subdirectory except those
with a .BAS extension, as you might have
intended to do. To do this from the
root directory you would have had to
enter

NO \BASIC\*.BAS DEL \BASIC\*.*

This complete filespec would tell NO
that it had to protect files in the
\BASIC, not in the current (i.e., root)
directory.

If you follow our recommendation and
enter

CD \BASIC
NO *.BAS DEL *.*

thus making \BASIC your current
directory before you start deleting, you
will then clean out all but the .BAS
files, just as you intended.

3. Should a parity check error, power
outage, or system crash occur during the
brief period between the times NO hides
and subsequently unhides the protected
files, those files will subsequently
seem to have disappeared. They are not
lost; only hidden from a DIR listing.
Use ATTR.COM (included in this set of
utilities) to change their hidden
status.


 December 12, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)