REM > Territories:Utilities.Collate2

LIBRARY"JLibraries:Error"
ON ERROR PROCError("Territories:Utilities.Collate2")

INPUT"Source file name: "f$
f% = OPENINf$
IF f% = 0 THEN ERROR 1, "Could not open source file"

DIM m% 255

 FOR c% = 0 TO 255
  z% = BGET#f%
  m%?z% = c%
 NEXT

INPUT"Destination file name: "g$
OSCLI"Save "+g$+" "+STR$~m%+" +100"
OSCLI"SetType "+g$+" Data"
