What is NSWP?
Invoking NSWP and moving about the directory
Functions that act on one file
Commands that act on many files
Other commands
Tags
Remarks
:What is NSWP?

NSWP  is  a  utility program for  maintaining  file  directories, 
transferring  files  between user areas on the  same  drive,  and 
transferring  files  between drives and user areas under  CP/M2.X 
and under CP/M 3.0.  

NSWP will not run under CP/M 1.4, but it will run under MP/M .

This software was  orginally written in  PL/I by  Robert  Fisher.
The current version was written in CP/M  assembler  by Dave  Rand
with a number of added functions.

:Invoking NSWP and moving about the directory

When  NSWP is invoked,  you will see a menu of 'commands'  and  a 
display of the current user area you are in, along with the total 
amount of space occupied by the files,  the number of files there 
are  and the amount of disk space remaining in k.  You will  then 
get a display of the first entry in the directory. NSWP will also 
give  you a listing of the user area that the file(s) are on,  if 
you logged in all user areas.  Typing 'space' or 'return' or  'F' 
moves  you  forward in the directory,  typing B (or b) moves  you 
backward.  The directory is circular,  so typing space at the end 
of the directory moves you to the beginning. (A line is skipped.) 
When you first invoke NSWP, you can specify an alternate drive to 
start on.

          NSWP B:

will begin with drive B:  logged in.  Selecting user area *  will 
cause all user areas to be "swept" at once.

At  any time,  you can recover the menu of functions by typing  a 
question mark (?).

Simply typing 'x' exits the program.

Note that all characters can be entered in upper or lower case.


:Functions that act on one file

C -- This allows you to copy the file to the drive and user  area 
of your choice. You will be prompted for the drive and user area. 
Just enter 'b3',  say, to transfer the file to drive B: user area 
3.  If you omit the user area,  the current user area of the file 
is  used.  Any file of the same name in the target area is  first 
erased,  an  exception  being  when you are transferring  to  the 
current drive and user area.  In the latter case, the transferred 
file is copied with its named changed by putting a $ in the  last 
letter of the file type.

If  an  existing file in the target area that must be  erased  is 
marked  read-only (R/O),  then the copy is simply not  made.  You 
will be told. You may use the delete function to delete the file, 
and then retry the copy.

As  an option,  NSWP will perform a CRC verification of the copy. 
When you are prompted for the drive and user, add a 'v' or 'V' to 
request verification. Thus specifying: b3 v will copy the file to 
drive b:,  user area 3,  with verification.  A description of the 
verification method is included with this documentation.

BUG: CP/M does not allow two files of the same name to be open on 
the  same  drive,  even  in  different  user  areas.  Thus,  when 
transferring  between user areas on the same  drive,  the  target 
file is first named with the $ convention and then renamed.  This 
can result in an extra file being erased.

If there is too little room on the target drive,  the transfer is 
aborted and the directory entry is erased. 

D -- The current file is deleted. You will be asked if you really 
want it erased. If the file is read-only (R/O), then a bdos error 
will occur, and the program will warm boot.

P -- The current file is sent to the LST:  device (your printer).  
If the file is squeezed, it will be unsqueezed as it is listed. A 
control-C interrupts the function.

R -- The  current file is renamed to the name and user  area  you 
specify. For example:

         A15:FOO    .COM? A0:FOO.COM

will rename the file from A15 to A0.

Lower  case will be converted to upper case,  but other 'illegal' 
characters are not trapped. It is quite possible to give names to 
files that CP/M won't recognize.  (You can also change them  back 
again later, however, so no harm is done.) Responding with "*" to 
the  prompt  will put you in the batch wildcard renaming  mode.If 
the  file is read-only,  a bdos error will occur and the  program 
will warm boot.

V  -- The  current  file  is  displayed  at  the  terminal,  with 
automatic  pagination.  The return key will continue the  process 
until  a control x is typed to cancel the display to the  screen. 
Single  line spacing is possible by typing the space bar when the 
screen display has stopped.

T -- Tag  a  file for later transfer.  (See below.)  After  being 
tagged,  the file will be marked with an asterisk,'*'.  The total 
of all tagged files is displayed both in units they occupy on the 
current  disk and in units they would occupy on a  single-density 
disk with a 1k block size.

U -- Undo the effect of T (and take away the '*' or '#').

:Commands that act on many files

M -- Mass  transfer  of all tagged files to a selected drive  and 
user area. This is the main reason for the program. If the target 
drive  fills,  the operation is aborted,  with the  untransferred 
files remaining tagged.  This function invokes the copy  function 
used  by C,  so everything said above applies here.  To abort the 
transfering process, you must enter a control c.

After  transferring a tagged file,  the tag is changed to '#'  so 
you can tell what has been sent.  This is for display  only,  the 
file is otherwise considered untagged, but see the A command. The 
'#' can be removed with the U command, if desired.

If no user area is specified, or if "*" is specified, the current 
user area of the file is used.

You  may  request verification on mass transfers just as  in  the 
single  file copy.  Just follow the drive and user  specification 
with a space and a 'v' or 'V'.

Q  -- Mass  transfer of all tagged files to a selected drive  and 
user area, unsqueezing those which have been previously squeezed. 
This function is otherwise identical to the "M" command.

A -- Retags all the files currently marked with '#'.  This allows 
you to repeat the transfers on another disk. Useful when the same 
batch of files must be sent to several disks.

R -- Batch rename.  You will be prompted for an "Old name:" and a 
"New name:".  In each case you may give any "ambiguous file name" 
in response. The logged-in directory is searched for matches with 
"Old  name",  and  the files are renamed,  if  possible,  by  the 
formula specified in "New name".  A '?' in "New name" means  keep 
that  character of the current file name,  an * is equivalent  to 
filling  out  the remainder of the field (filename  or  filetype) 
with  "?"'s.  Any  other  character  replaces  the  corresponding 
character  in the current file name.  When the substitutions  are 
done, embedded spaces are removed. 

 
:Other commands

B -- Move  to  previous  file.  Moves  to last file  if  you  are 
currently on the first file.

L -- Login new drive and user area. If the user area is ommitted, 
the  current user area is used.  You can NOT specify  a  starting 
place in the directory.  Selecting "*" for user area, logs in all 
user areas at once.

S -- Calculates space remaining on a drive.

X -- Exit to CP/M.

? -- Redisplay menu of commands.


:Tags

* -- Marks a tagged file.  See M command.

# -- Marks  a previously tagged file that has been transferred by 
the  M or Q command.  It is logically untagged,  and the # can be 
removed with the U command if it bothers you.  Files marked  with 
'#' can be retagged with the A command.

Unmarked files are untagged.
:Remarks

Whenever a drive is asked for (and on start-up),  the disk system 
is reset.  This is to prevent a disk from being 'read only' under 
CP/M, and to allow you to repeat operations on fresh disks (e.g., 
finish  a mass transfer after a disk fills by inserting a  second 
disk).  It  also means that you should be free to switch  density 
and/or  number  of sides of a disk in a particular  drive.  This, 
however, depends on how well your BIOS is written.  

There  is  no logical upper limit to directory size,  nor to  the 
size  of a file that may be transferred.  The directory  size  is 
limited by available memory,  though, as certain information must 
be  kept on each entry.  You should be able to use well over 1500 
entries  in a 64k system.  Figure 20 bytes per entry starting  at 
26k and running up to within 1k, or so,of the BDOS. 

File  transfers make use of as much memory as possible to  buffer 
data.

It is legal to include the colon when specifying a drive and user 
area. Thus responding "B3:" is equivalent to just "B3".

Copy  verification  is  done by computing a  CRC  checksum  while 
writing the file.  NSWP then reads the copied file back computing 
it's checksum. The two checksums are compared and you are told if 
they don't match.

The CRC verification takes approximately 2.5 times as long as the 
straight copy.

The author plans to add the ability to squeeze a file during  the 
transfer.   As of this writing,  Richard Greelaw's SQ.COM remains 
the only way to do this. 

This  documentation last updated 06 Sept 83 by Dave  McCrady.  It 
reflects  the  latest  version available  at  that time.
