/**************************************************************************\
         $VER: CNet Amiga Stripper, v.01 by Dotoran (16-May-96)

    SysOps running a bbs OTHER THAN CNet Amiga can use this script to
    DELETE the CNet Amiga Data files which are also housed within these
    directories.

    To run this script, open a CLI/Shell window, then issue this command:

    1> rx path/StripCNet

    where "path/" is replaced by the exact path location this script is
    located in.
                                                                 - Dotoran
\**************************************************************************/
options results ; lf="0A"x ; say "[2J[1;1H" ; call SETUP
say "[1;42;31m     AmiNet Text Files `CNet Data File' Stripper, v.01 by Dotoran!     [0m"lf

say "   This script will strip the CNet Amiga data files from the included"
say "directories for those SysOps NOT running CNet Amiga."

say lf"Enter path to `Aminet/' directory: (Not including `Aminet/')"
pull path

if ~exists(path'Aminet/') then do
  say "I could not find `"path"Aminet/'... Exiting..."lf ; exit ; end

path=path"Aminet/"

say lf"   There is a text file titled `sys.entry' which resides in the `data/'"
say "directories which are about to be deleted. These files can act as title"
say "screens you could use when a user enters each area. Would you like these"
say "files copied to an alternate directory first? (Y or N)"
pull entry

if entry="Y" then do
  say lf"Creating `EntryScreens/' directory inside `Aminet/' directory..."
  address command "makedir "path"EntryScreens"
  say "Copying `sys.entry' files into `EntryScreens/' directory..."lf
  say "  Copying main title screen as `!MainTitle'..."
  address command "copy "path"data/sys.entry "path"EntryScreens/!MainTitle"
  do i=1 to dirs
    say "  Copying "dir.i"data/sys.entry as `"strip(dir.i,,"/")"_Title'..."
    address command "copy "path||dir.i"data/sys.entry "path"EntryScreens/"strip(dir.i,,"/")"_Title"
  end i
end

say lf"Now deleting the `data/' directories..."lf
say "Deleting main data directory..."
address command "delete "path"data/ ALL FORCE"
do i=1 to dirs
  say lf"Deleting the `"dir.i"data/' directory..."
  address command "delete "path||dir.i"data/ ALL FORCE"
end i

say lf"Finished! You are now left with just the AmiNet Text Files, with title"
say "screens located in "path"EntryScreens/"lf

exit
SETUP: ; dirs=15
  dir.1 ="Biz/"     ; dir.2 ="Comm/"    ; dir.3 ="Demo/"
  dir.4 ="Dev/"     ; dir.5 ="Disk/"    ; dir.6 ="Docs/"
  dir.7 ="Game/"    ; dir.8 ="Gfx/"     ; dir.9 ="Hard/"
  dir.10="Misc/"    ; dir.11="Mods/"    ; dir.12="Mus/"
  dir.13="Pix/"     ; dir.14="Text/"    ; dir.15="Util/"
 return
