; This script will RESTART your BBS from SCRATCH!

.bra [
.ket ]

FailAt 30

echo "Creating directories DATFILES, TEXTS, TXTFILES, DESC and PRGS..."
makedir DATFILES
makedir TEXTS
makedir TXTFILES
makedir PRGS
makedir DESC

echo "Deleting all eventual texts..."
delete TEXTS/#?
echo >TEXTS/Head0
echo >TEXTS/Text0

echo "Deleting eventual .DAT files..."
cd DATFILES
copy Statistic0.dat Statistic.dat
copy System0.dat System.dat
echo >Meet.dat
echo >User.dat
echo >Area.dat
echo >File.dat

echo "Deleting eventual long descriptions..."
cd /DESC
delete #?.desc

if NOT EXISTS libs:xprzmodem.library
  echo "Copying xprzmodem.library to libs:
  copy /libs/xprzmodem.library libs:
endif

if NOT EXISTS libs:NTPro.library
  echo "Copying NTPro.library to libs:
  copy /libs/NTPro.library libs:
endif

if NOT EXISTS libs:fifo.library
  echo "Copying fifo.library to libs:
  copy /libs/fifo.library libs:
endif

if NOT EXISTS s:NT.cfg
  echo "Copying NT.cfg and NTBackup to s:
  copy /s/NT.cfg s:
  copy /s/NTBackup s:
endif

cd /

echo ""
echo "Your BBS is now restarted from SCRATCH!"
echo ""

