home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / icom201b.zip / POSTFILE.SCR < prev    next >
Text File  |  1994-06-06  |  22KB  |  569 lines

  1. ;----------------------------------------------------------------------------
  2. ; POSTFILE.SCR  Intellicomm v2 script to virus check and otherwise handle
  3. ; newly downloaded files.  Run POSTINI.SCR to configure this script.
  4. ;
  5. ;----------------------------------------------------------------------------
  6. ; NOTE: There are many simple changes you can make to this script to
  7. ; do anything from adding support for new archive types to converting all
  8. ; non-ZIP archives to ZIP format.  Many tips and examples were placed at the
  9. ; END of this script (press [Ctrl-PgDn] to get to the end) as well as a
  10. ; 'CustomWork' subroutine where you can perform customized work on newly
  11. ; downloaded archives.
  12. ;----------------------------------------------------------------------------
  13.  
  14. rxflush                              ;flush receive buffer (logoff garbage)
  15. variable v
  16. variable olddir $CURDIR              ;save current directory
  17. variable postfileini $SCRIPT_DIR "POSTFILE.INI"
  18. notexist postfileini gosub Configure
  19.  
  20. if GlobalStr[0] <> 3                 ;are the 3 filename parms there?
  21.  print "This is not a stand-alone script.  Please run POSTINI.SCR for
  22.  pause "setup instructions.  Press a key..."
  23.  return
  24. endif
  25.  
  26. variable fh
  27. fopen fh postfileini "r"         ;open POSTFILE.INI for "r"eading
  28. if $ERRORLEVEL <> 0
  29.  cls
  30.  print "Can't open POSTFILE.INI.  Add FILES=45 to your CONFIG.SYS file."
  31.  pause "Press a key... "
  32.  exit
  33. endif
  34.  
  35. variable virusrpt $HOME_DIR "VIRUS.RPT"
  36. variable tmpdir $HOME_DIR "TESTDIR"
  37. variable picview
  38. variable picfiles
  39. variable zipx
  40. variable arcx
  41. variable arjx
  42. variable lhax
  43. variable zoox
  44. variable pakx
  45. variable viruschk
  46. variable virusaction
  47. variable holdingarea
  48. variable FILEMAN_if_clean
  49. variable FILELIST_if_virus
  50. variable describe_4DOS
  51.  
  52. fgets picview fh
  53. fgets picfiles fh
  54. fgets zipx fh
  55. fgets arcx fh
  56. fgets arjx fh
  57. fgets lhax fh
  58. fgets zoox fh
  59. fgets pakx fh
  60. fgets viruschk fh
  61. fgets virusaction fh
  62. fgets holdingarea fh
  63. fgets FILEMAN_if_clean fh
  64. fgets FILELIST_if_virus fh
  65. fgets describe_4DOS fh
  66. fclose fh
  67.  
  68. strpos v picfiles GlobalStr[2]       ;extension matches a picture type?
  69. if v > -1 goto ViewPicture           ;check/view if a picture
  70.  
  71. menudefine "~Yes" "~No"
  72.  
  73. mkdir tmpdir                         ;create the temporary directory
  74. chdir tmpdir                         ; and change to it for uncompress
  75.  
  76. if $ERRORLEVEL > 0                   ;oops... couldn't create or change
  77.  print "WARNING: POSTFILE.SCR Unable to create or change to directory:
  78.  print tmpdir
  79.  print "Virus check not performed on file " GlobalStr[1] GlobalStr[2]
  80.  pause "Press a key..."
  81.  return
  82. endif
  83.  
  84. addslash tmpdir
  85. capture $CAP_NAME                    ;captures PRINT commands to ICOM.CAP
  86.  
  87. strset v "─" 0 75                    ;a line, 75 chars long
  88. print "^M^J" v                       ;print a blank, then the line
  89. print "POSTFILE.SCR Testing file: ^B" GlobalStr[1] GlobalStr[2]
  90. print
  91.  
  92. switch GlobalStr[2]               ;GlobalStr[2] has the file extension (.EXT)
  93.  case ".ZIP"
  94.   dos zipx " " GlobalStr[3]       ;GlobalStr[3] has the D:\PATH\FILENAME.EXT
  95.  endcase
  96.  case ".ARC"
  97.   dos arcx " " GlobalStr[3]
  98.  endcase
  99.  case ".ARJ"
  100.   dos arjx " " GlobalStr[3]
  101.  endcase
  102.  case ".LZH"
  103.   dos lhax " " GlobalStr[3]
  104.  endcase
  105.  case ".ZOO"
  106.   dos zoox " " GlobalStr[3]
  107.  endcase
  108.  case ".PAK"
  109.   dos pakx " " GlobalStr[3]
  110.  endcase
  111.  default                          ;not a recognized compression type
  112.   gosub DescribeFile
  113.   print GlobalStr[3]
  114.   print "Not a recognized archive type.  No virus scan performed."
  115.   goto Cleanup
  116.  endcase
  117. endswitch
  118.  
  119.  ;Now scan for viruses, redirecting the Virus Checker's output
  120.  ; to VIRUS.RPT
  121.  
  122. EXEC viruschk " > " virusrpt
  123.  
  124. if $ERRORLEVEL < 0
  125.  print "WARNING: Can't execute command: " viruschk
  126.  print GlobalStr[3] " not virus checked!"
  127.  goto Cleanup
  128. endif
  129.  
  130. if $ERRORLEVEL > 0 goto PossibleVirus  ;checker returned an errorlevel
  131.  
  132. delete virusrpt                        ;we're done with this
  133. print GlobalStr[1] GlobalStr[2] " is clean."
  134. gosub UpdateDescription                ;checks for FILE_ID.DIZ
  135. if describe_4DOS <> 0 gosub DescribeFile
  136.  
  137.  ;NOTE: If you want to do any custom work on clean files, such as
  138.  ; re-compressing the files into a .ZIP if another archive format was
  139.  ; used, and/or deleting BBS Ads, etc., here is where you'd do it.
  140.  ; Remove the semicolon (;) before GOSUB CustomWork below, then place the
  141.  ; custom commands you want to perform at the end of this script
  142.  ; (subroutine 'CustomWork:' is already in place, complete with examples).
  143.  
  144. ;GOSUB CustomWork
  145.  
  146. variable InstallScr tmpdir "@ICOM.SCR"
  147. notexist InstallScr goto ManualBrowse
  148.  
  149. ;------------------------------------------------------------------------------
  150. InstallScrMenu:
  151. ;------------------------------------------------------------------------------
  152. menudefine "~Yes" "~No" "~View Script First"
  153. print "^M^JAn auto-install script was found for " GlobalStr[1] GlobalStr[2] "!"
  154. printnc "Execute it? "
  155. menubar                        ;Yes/No menu MENUDEFINEd at startup
  156. print
  157.  
  158. if $MENUSELECTION = 1
  159.  script InstallScr
  160.  goto Cleanup
  161. endif
  162.  
  163. if $MENUSELECTION = 3          ;View First (option 3)
  164.  edit InstallScr               ;(Edit allows user to customize)
  165.  goto InstallScrMenu
  166. endif
  167.  
  168. ; fall through... if any other menuselection or [Esc]
  169.  
  170. ;------------------------------------------------------------------------------
  171. ManualBrowse:
  172. ;------------------------------------------------------------------------------
  173. if FILEMAN_if_clean = 1
  174.  print "Entering File Manager for inspection/installation..."
  175.  delay 20
  176.  FileMan tmpdir
  177. endif
  178. goto Cleanup
  179.  
  180. ;------------------------------------------------------------------------------
  181. PossibleVirus:
  182. ;------------------------------------------------------------------------------
  183. print "Virus Checker reported error #" $ERRORLEVEL
  184. print
  185.  
  186. capclose                     ;close: APPEND below does an FOPEN on the file
  187. append virusrpt $CAP_NAME    ;add error report to the .CAP as well.
  188. capture $CAP_NAME
  189.  
  190. switch virusaction     ;what to do... we have a possible nasty here
  191.  case 1                ;display error, enter the File Manager to check it out
  192.   pause "Press a key to view Virus Checker output..."
  193.   List virusrpt
  194.   FileMan tmpdir
  195.                        ;if file was deleted in the File Manager, we're done
  196.                        ; Otherwise, ask the user whether to delete it or not
  197.   notexist GlobalStr[3] endcase
  198.   assign v "^IDelete " GlobalStr[1] GlobalStr[2] "?"
  199.   menuboxh $SCRIPT_NAME v
  200.   if $MENUSELECTION = 1 delete GlobalStr[3]  ;user selected "Yes"
  201.  endcase
  202.  case 2                ;delete the nasty
  203.   delete GlobalStr[3]  ;the full d:\path\fname.ext of the archive
  204.   print GlobalStr[3] " deleted."
  205.  endcase
  206.  case 3                ;move nasty to 'holdingarea' directory
  207.   addslash holdingarea ;make sure it has a trailing \
  208.   assign v holdingarea GlobalStr[1] GlobalStr[2]
  209.    ;rename MOVES files if destination on the same drive.  If not on the
  210.    ; same drive (can't move) it sets $ERRORLEVEL to 1
  211.   rename GlobalStr[3] v
  212.   if $ERRORLEVEL = 0
  213.    print GlobalStr[1] GlobalStr[2] " moved to " v
  214.   else
  215.    ;use COPY/DELETE if get an error with RENAME
  216.    print "Copying " GlobalStr[1] GlobalStr[2] " to " v
  217.    copy GlobalStr[3] v
  218.    if $ERRORLEVEL = 0 delete GlobalStr[3]
  219.   endif
  220.   if $ERRORLEVEL > 0
  221.    print "WARNING: Unable to move " GlobalStr[1] GlobalStr[2] " to"
  222.    print v
  223.   endif
  224.  endcase
  225.                        ;case 4 or any other, we do nothing
  226. endswitch
  227.  
  228. delete virusrpt        ;we're done with this
  229.  
  230.  ;Icom checks the filename field (which will always have something in it
  231.  ; since we just transferred the file) when POSTFILE.SCR returns, and if
  232.  ; the field is BLANK, it skips adding the file to the FILELIST catalog.
  233.  ; We caught a problem above with the virus check, so here we clear
  234.  ; the filename field IF FILELIST_if_virus is turned off in POSTFILE.INI.
  235.  ;  If it's not set to zero then the filename remains intact and Icom adds
  236.  ; the record to the FILELIST catalog.
  237.  
  238. if FILELIST_if_virus = 0
  239.  assign $CNAME_FLD ""
  240. else
  241.  gosub UpdateDescription
  242. endif
  243.  
  244. goto Cleanup
  245.  
  246. ;------------------------------------------------------------------------------
  247. UpdateDescription:
  248. ;------------------------------------------------------------------------------
  249. assign v ""
  250. exist "DESC.SDI" assign v "DESC.SDI"
  251. exist "FILE_ID.DIZ" assign v "FILE_ID.DIZ"
  252. strblank v return
  253.  
  254. ccleardesc                 ;clear out the existing description (if any)
  255.  
  256. variable f                 ;don't define variables in a subroutine unless you
  257. variable linebuf           ; know it'll only be called ONCE (error otherwise)
  258.  
  259. print "Getting official archive description from " v
  260.  
  261. fopen f v "r"              ;open for reading
  262.  
  263. while 1
  264.  fgets linebuf f
  265.  if $ERRORLEVEL <> 0 break ;end of file
  266.  cputdesc linebuf 0        ;0 = append line
  267. endwhile
  268.  
  269. fclose f
  270. assign linebuf $HOME_DIR "FILE_ID.DIZ"
  271. copy v linebuf             ;update the FILE_ID.DIZ Icom wrote previously,
  272.                            ; in case something else (subroutine CustomWork)
  273.                            ; wants to use it
  274. return
  275.  
  276. ;------------------------------------------------------------------------------
  277. DescribeFile:
  278. ;------------------------------------------------------------------------------
  279. ;Many thanks to Steve Willer for coming up with this idea.
  280. ;
  281. ;Modified 03/29/94 to use a text file to describe the file (bypassing the
  282. ; 128 character maximum DOS description size) instead of passing the
  283. ; description directly on the command line.  The description is written
  284. ; to a text file (with no CR's to terminate each line; required) then
  285. ; uses input re-direction to input the description.
  286. ;------------------------------------------------------------------------------
  287. variable DescMax 200          ;4DOS DescriptionMax
  288. variable linenum 1
  289. variable desclen
  290. variable curlen
  291. variable linelen
  292. variable out_name $HOME_DIR "4DOS.TXT"
  293. variable out
  294.  
  295. print "Describing file with 4DOS.  If DESCRIBE beeps at you add the line:"
  296. print "DescriptionMax = 200 to your 4DOS.INI file!^M^J"
  297.  
  298. fopen out out_name "w"         ;create the temporary file
  299. assign v "(FROM " $CLOC_FLD ") "
  300. fputsnc out v
  301. strlen desclen v
  302.  
  303. while desclen < DescMax
  304.  cgetdesc v linenum
  305.  if $ERRORLEVEL <> 0 break
  306.  inc linenum
  307.  strcat v " "                  ;a space separates each line; not CR/LF
  308.  strlen linelen v              ;get length of current line
  309.  add curlen desclen linelen    ;total length of description
  310.  if curlen >= DescMax
  311.   sub linelen DescMax desclen  ;how many characters can we add?
  312.   setchr v "" linelen          ;terminate 'v' at maxlen
  313.  endif
  314.  fputsnc out v
  315.  assign desclen curlen
  316. endwhile
  317.  
  318. fputsnc out "^M"               ;add a CR to terminate the description
  319. fclose out
  320.  
  321. dos "DESCRIBE " GlobalStr[3] " < " out_name
  322. delete out_name
  323.  
  324. return
  325.  
  326. ;-----------------------------------------------------------------------------
  327. Cleanup:
  328. ;-----------------------------------------------------------------------------
  329. chdir tmpdir                    ;make sure we're still in the right place
  330. if $ERRORLEVEL = 0 delete "*.*" ;clean up the temporary directory
  331. chdir olddir                    ;change back to original directory
  332. rmdir tmpdir                    ;delete the temp directory
  333. print
  334. capclose
  335. return
  336.  
  337. ;-----------------------------------------------------------------------------
  338. ViewPicture:
  339. ;-----------------------------------------------------------------------------
  340. variable percent
  341. variable piclen
  342.  
  343. strblank picview exit            ;no picview command, nothing to do
  344.  
  345. strchr percent picview "%"       ;where is the %?
  346. if percent = -1                  ;-1 if no % found
  347.  strcat picview " " GlobalStr[3] ;just add the picture name
  348. else
  349.  strlen piclen GlobalStr[3]      ;store length of full picture filename
  350.  strdel picview percent 1        ;kill the %
  351.  strins picview GlobalStr[3] percent piclen
  352. endif
  353.  
  354. fnstrip v GlobalStr[3] 12        ;mode 12 = D:\PATH\ only
  355. chdir v                          ;in case the pic viewer has a file menu
  356.                                  ; so you can delete the picture, etc.
  357. print "Viewing " GlobalStr[1] GlobalStr[2]
  358. dos picview
  359.  
  360.  ;Here you might want to add a menu that allows you to Delete or
  361.  ; Move the picture to a special picture area.  Defining menus in
  362.  ; scripts is simple ... juse MENUDEFINE "~Delete" "~Move", then
  363.  ; either MENUBAR, MENUBOXH, MENUBOXV to show the menu.  See the
  364.  ; menus above for examples.
  365.  
  366. chdir olddir                     ;return to original directory
  367. exit                             ;exit the script from here
  368.  
  369. ;------------------------------------------------------------------------------
  370. Configure:
  371. ;------------------------------------------------------------------------------
  372.  
  373. assign v $SCRIPT_DIR "POSTINI.SCR"
  374. notexist v goto INIMissing
  375.  
  376. wndopen $SCRIPT_NAME
  377. print "^M^JImportant note: ^BPLEASE READ FULLY!^B^M^J"
  378. print "^BPOSTFILE.SCR^B has not been configured as yet.  This script allows you"
  379. print "to automatically virus check and otherwise handle newly downloaded files,
  380. print "but you must first look a few settings over and make any necessary (or
  381. print "more preferable) changes.^M^J"
  382.  
  383. print "When you press a key, you will enter the POSTFILE.SCR ^Bmain setup program^B"
  384. print "where you can change the way POSTFILE.SCR operates to suit your system and"
  385. print "your preferences.  Please press a key..."
  386. pause
  387. wndclose
  388.  
  389. script "POSTINI"
  390. assign v $SCRIPT_DIR "POSTFILE.SCR"
  391. notexist v exit                      ;Disabled
  392. notexist postfileini exit            ;Still no .INI file
  393. return
  394.  
  395. :INIMissing
  396. wndopen $SCRIPT_NAME
  397. cls
  398. print "NOTE: Neither POSTFILE.INI nor the POSTFILE.SCR main setup program POSTINI.SCR"
  399. print "could be found!  To use POSTFILE.SCR you must first install POSTINI.SCR in"
  400. print "the " $SCRIPT_DIR " directory.^M^J"
  401. pause "Press a key... "
  402. wndclose
  403. exit
  404.  
  405. ;------------------------------------------------------------------------------
  406. CustomWork:
  407. ;------------------------------------------------------------------------------
  408. ;Add your custom work for virus-free archives here (before the 'RETURN'),
  409. ; if desired.  If you haven't already removed the semicolon before
  410. ; 'GOSUB CustomWork' above, you must do so or this subroutine will not
  411. ; be called.
  412. ;
  413. ; Note that the full file description has been written to:
  414. ;
  415. ; $HOME_DIR "FILE_ID.DIZ"  ;C:\ICOM\FILE_ID.DIZ
  416. ;
  417. ; by Icom and you could add that file to the archive if it doesn't exist in
  418. ; the 'tmpdir' (i.e. in the achive).  You'd need a 'switch' statement
  419. ; similar to the one above used to uncompress the archive, to make sure that
  420. ; the proper compression command was used.  Example (remember, the current
  421. ; directory is the temp directory we uncompressed the archive to while
  422. ; POSTFILE.SCR is running):
  423. ;
  424. ; exist "FILE_ID.DIZ" return                    ;only if it doesn't exist...
  425. ; exist "DESC.SDI" return                       ;the other type of 'ID' file
  426. ;
  427. ;  ;now we know the archive doesn't have a description file within, so
  428. ;  ; we'll add the one Icom created:
  429. ;
  430. ; variable fileid_diz $HOME_DIR "FILE_ID.DIZ"   ;build the filename Icom made
  431. ;
  432. ; switch GlobalStr[2]                           ;archive .EXTenstion
  433. ;  case ".ZIP"
  434. ;   exec "PKZIP -a " GlobalStr[3] " " fileid_diz
  435. ;  endcase
  436. ;  case ".ARC"
  437. ;   exec "PKPAK -a " GlobalStr[3] " " fileid_diz
  438. ;  endcase
  439. ;  ...                                          ;etc. for the others
  440. ;  ...
  441. ; endswitch
  442. ;
  443. ; Note that if you modify the original archive, you'd normally lose the
  444. ; original archive date/time.  But Icom automatically saves the archive
  445. ; date/time before calling POSTFILE.SCR, and restores it upon return
  446. ; in case you modify the archive here.
  447. ;
  448. ; However, if you change the FILENAME of the original archive (e.g. ARJ to ZIP)
  449. ; you must make sure to ASSIGN the new filename to the $CNAME_FLD, or Icom
  450. ; will place the wrong filename in the FILELIST catalog, and won't be able
  451. ; to restore the file date/time to what it was originally.  For example you
  452. ; might do something like this to convert non-ZIP files to ZIP format:
  453. ;
  454. ; if GlobalStr[2] <> ".ZIP"               ;not a .ZIP archive?
  455. ;  variable archive_name
  456. ;  fnstrip archive_name GlobalStr[3] 4    ;mode 4 = D:\PATH\FNAME (no .EXT)
  457. ;  exec "PKZIP " archive_name " *.*"      ;add all files to new .ZIP archive
  458. ;  if $ERRORLEVEL = 0                     ;successful?
  459. ;   delete GlobalStr[3]                   ;kill the non-ZIP archive
  460. ;   assign $CNAME_FLD GlobalStr[1] ".ZIP" ;same name, new extension.  Icom now
  461. ;  endif                                  ; stores the proper filename in
  462. ; endif                                   ; the FILELIST catalog, AND it
  463. ;                                         ; restores the ORIGINAL archive date
  464. ;                                         ; on the newly created ZIP.
  465.  
  466. CHDIR tmpdir     ;First make sure we're in the right directory
  467.  
  468.  ;Remove this comment and insert your commands here (as many lines as you
  469.  ; like).
  470.  
  471. RETURN           ;LAST statement in subroutine.
  472.  
  473. ;------------------------------------------------------------------------------
  474. ; POSTFILE.SCR TIPS AND NOTES:
  475. ;
  476. ; After the virus check (see above), all the files in the archive will be
  477. ; sitting in the temporary directory ready for whatever you want to do with
  478. ; them.  You could choose to re-compress the files using PKZIP, to standardize
  479. ; all your files and avoid keeping other archive types on-disk; you could
  480. ; delete files that are known BBS advertisements, then re-compress the
  481. ; archive, etc.  Please see the 'CustomWork' subroutine above for examples,
  482. ; if you're interested.
  483. ;
  484. ; Note also that the file description Icom had prior to the download
  485. ; (from the new files list you imported to tag the file) is written to
  486. ; \ICOM\FILE_ID.DIZ before this script is called.  So you could choose to
  487. ; add that to the archive, if it doesn't exist.  Again, see the CustomWork
  488. ; subroutine for an example.
  489. ;
  490. ; By looking closely at the script above, you should be able to clearly
  491. ; see how to add your own custom commands and routines to POSTFILE.SCR,
  492. ; even if you haven't read SCRTUTOR.DOC as yet.  Of course, if you're
  493. ; happy with POSTFILE.SCR as is, you needn't change anything in this
  494. ; script.  But you can do a whole lot more if you're inclined.
  495. ;
  496. ;----------------------------------------------------------------------------
  497. ; Intellicomm passes three parameters to this script (stored by the Script
  498. ; Processor in the GlobalStr array where passed parms always go):
  499. ;
  500. ;  GlobalStr[1] has the FILENAME of the archive (no extension or .)
  501. ;  GlobalStr[2] has the .EXT (extension with the . included)
  502. ;  GlobalStr[3] has the full D:\PATH\FILENAME.EXT
  503. ;
  504. ;---------------------------------------------------------------------------
  505. ; ADDING SUPPORT FOR NEW ARCHIVE TYPES:  See the first 'switch' command in
  506. ; this script where GlobalStr[2] is compared to the various .EXTensions.  All
  507. ; you need is a new 'case/endcase' along with the proper decompression
  508. ; command to add support for more archive types:
  509. ;
  510. ;  ...
  511. ;  case ".XYZ"                               ;the extension of the archive
  512. ;   dos "UN-XYZ.EXE -switches " GlobalStr[3] ;command to uncompress it
  513. ;  endcase
  514. ;  ...
  515. ;
  516. ; Self-extracting archives (.COM/.EXE) could also be supported by executing
  517. ; the archive.  But if you do this you might want to run a virus check on
  518. ; the file before executing it -- if it's not a self-extracting archive and
  519. ; is simply a PROGRAM, you may install a virus on your system by
  520. ; executing the file.  Example:
  521. ;
  522. ;  ...
  523. ;  case ".COM"
  524. ;  case ".EXE"
  525. ;   exec "SCAN " GlobalStr[3] " /A /nomem /noexpire >" virusrpt
  526. ;   if $ERRORLEVEL <> 0 goto PossibleVirus
  527. ;   exec GlobalStr[3]
  528. ;  endcase
  529. ;  ...
  530. ;
  531. ; This runs a scan on the .COM or .EXE, and if no errorlevel is returned
  532. ; it then executes the file to uncompress it.  Of course, if the file ISN'T
  533. ; a self-extracting archive POSTFILE will simply run a program... and
  534. ; this is why self-extracting archives are ignored by default.
  535. ;
  536. ;----------------------------------------------------------------------------
  537. ; READER BONUS: If you've read the "Introduction to Database Commands" in
  538. ; SCRTUTOR.DOC, be aware that by the time Intellicomm calls POSTFILE.SCR
  539. ; it has already performed a CGETREC on the Tagger catalog record that is
  540. ; associated with the file we're virus checking here.  So, you can use
  541. ; POSTFILE.SCR to do anything you want with the record -- BEFORE it is
  542. ; imported to the FILELIST catalog (or exported to your BBS listing, if
  543. ; you're a Sysop).
  544. ;
  545. ; Icom loads the catalog record into memory (CGETREC), it calls this script,
  546. ; and it then immediately writes the record (still in memory from CGETREC)
  547. ; into the FILELIST catalog, WITHOUT re-loading the record from disk after
  548. ; this script finishes.  Thus, if you modify any of the fields (or the file
  549. ; description) here in POSTFILE.SCR, the changes will be written to the
  550. ; FILELIST catalog and will also be exported if any of the Sysop export
  551. ; options are turned on in the Icom main setup.
  552. ;
  553. ; For example, you could add notes or customized comments:
  554. ;
  555. ;  CPUTDESC "Auto-downloaded by Intellicomm." 0
  556. ;
  557. ; The above appends a new comment line to the end of the existing description
  558. ; (due to the 0 specified as the comment line, which appends to the existing
  559. ; file description).  You needn't CPUTREC to write the record to disk after
  560. ; modifying it in this script.  Icom does a CPUTREC itself, into the
  561. ; FILELIST catalog, when POSTFILE.SCR finishes.
  562. ;
  563. ; Do NOT use CGETREC or any database functions other than CPUTDESC and
  564. ; CGETDESC in this script!  You're free to modify the catalog record in
  565. ; memory (the $CXXX_FLD fields and the description), but you mustn't load
  566. ; new records from disk in this script, or otherwise mess around with the
  567. ; catalog on-disk.
  568. ;------------------------------[End of File]----------------------------------
  569.