;
; This script (DLGAmiga.Batch) is a sample script for creating the
; FileList for a sample SIG. The script assumes that the SIG is called the
; "Amiga SIG" and the output file is "Amiga.Lst". The script automatically
; creates LZH, ARC and ZOO archives to be hurled into the appropriate file
; area for download by users.
;
; The SIG consists of DLG file areas 1 through 25.
;
; Copyright 1991, Michael B. Smith
; All rights reserved. This program is freely distributable.
;
; This script WILL NOT WORK on 1.2 (due to the Assign EXISTS below).
; This script has not been tested on 1.3 (but should work - I think :)).
;
; DLG is assumed to be the destination directory for the '.lst', '.LZH',
; '.ZOO' and '.ARC' files.
;
; Make sure that required directories (DLG: and FILE:) have been assigned!
;
Assign >nil: DLG: EXISTS
If WARN
   Echo "DLG: directory not assigned!!! Quitting."
   Skip Done
EndIf
;
Assign >nil: FILE: EXISTS
If WARN
   Echo "FILE: directory not assigned!!! Quitting."
   Skip Done
EndIf
;
CD DLG:
;
; Save us from ZOO
;
Stack 25000
;
; Save the last '.lst' file
;
If EXISTS Amiga.Lst
   Echo "Renaming Amiga.Lst as Amiga.Bak"
   If EXISTS Amiga.Bak
      Delete >nil: Amiga.Bak QUIET
   EndIf
   Rename >nil: Amiga.Lst Amiga.Bak
EndIf
;
; Build the new '.lst' file
; DLGFilelist assumed to be in Path
; Note use of the '-c' (COMPACT) option
;
;DLGFilelist  "Amiga SIG" Amiga.Lst -c 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
;
DLGFileList "Amiga SIG" Amiga.Lst -c 1 2 3 70 75  ; for a quick test
;
; Build the new Archives (after removing the old ones)
; (note that on 2.0 QUIET isn't quiet -- Delete tells you what it removed)
;
If EXISTS Amiga.LZH
    Delete >nil: Amiga.LZH QUIET
EndIf
;
If EXISTS Amiga.ARC
    Delete >nil: Amiga.ARC QUIET
EndIf
;
If EXISTS Amiga.ZOO
    Delete >nil: Amiga.ZOO QUIET
EndIf
;
Echo "Building LZH archive..."
LHArc a Amiga Amiga.Lst
;
Echo "Building ARC archive..."
Arc   a Amiga Amiga.Lst
;
Echo "Building ZOO archive..."
Zoo   a Amiga Amiga.Lst
;
; Need an automatic way to hurl this stuff into DLG....
;
Echo " "
Echo " "
Echo " "
Echo "Amiga SIG FileList & Archives built in directory DLG:"
Echo "Hurl Amiga.LZH, Amiga.ARC and Amiga.ZOO into the DLG Pro BBS"
Echo " "
;
Echo "Complete"
;
Lab Done
