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

  1. ;-----------------------------------------------------------------------
  2. ; POSTTAG.SCR  This Intellicomm v2 script reads the NEWFILES catalog
  3. ; and executes POSTFILE.SCR on all Tagged files.  It also copies the
  4. ; Tagged files into the FILELIST catalog.
  5. ;
  6. ; TO INSTALL:
  7. ;
  8. ; Copy the script into your Intellicomm Script Directory (\ICOM\SCR by
  9. ; default).
  10. ;
  11. ; TO USE: 
  12. ;
  13. ; 1. Make sure that the files you intend to operate on are in your
  14. ;    Intellicomm Download Directory (this is where POSTFILE.SCR
  15. ;    will look for the file).
  16. ;
  17. ; 2. Select "Browse New BBS Files" from the Icom Main Menu, and Tag
  18. ;    any files you want to operate POSTFILE.SCR on (perhaps files
  19. ;    that you added manually, or that were imported from a text
  20. ;    file or were scanned in using Import from Disk).
  21. ;
  22. ; 3. Press [Alt-U] to enter the Script Manager, hilight POSTTAG.SCR
  23. ;    and select "Run".
  24. ;
  25. ;-----------------------------------------------------------------------
  26.  
  27. variable filename
  28. variable extension
  29. variable fullpath
  30. variable tagged_record
  31.  
  32. copen "NEWFILES"
  33. csetsort 1 0                     ;sort by Tag Status/Location
  34.  
  35. while 1
  36.  cgetrec
  37.  if $ERRORLEVEL <> 0 break       ;non-zero, at the end of the catalog
  38.  if $CTAG_FLD = "N" continue     ;record is noted... skip it
  39.  if $CTAG_FLD <> "T" break       ;record not tagged or noted; we're done
  40.  ctell tagged_record             ;get the record #
  41.  fnstrip filename $CNAME_FLD 7   ;get the filename (no .EXT)
  42.  fnstrip extension $CNAME_FLD 15 ;get the .EXT (no filename)
  43.  assign fullpath $DL_DIR $CNAME_FLD
  44.  script "POSTFILE" filename extension fullpath
  45.  if $CNAME_FLD = ""              ;this sucker had a virus...
  46.   cdelrec tagged_record          ;kill it
  47.   continue
  48.  endif
  49.  copen "FILELIST"                ;close NEWFILES/open FILELIST
  50.  caddrec                         ;add the record to FILELIST
  51.  copen "NEWFILES"
  52.  csetsort 1 0                    ;gotta do this again
  53.  cgetrec tagged_record           ;get back to the record
  54. endwhile
  55.  
  56. ;--------------------------[End of script]------------------------------
  57.