| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 458.1 | This script might serve as a starting point | BUFFER::VICKERS | If it helps a customer, DO IT | Thu Apr 09 1992 20:11 | 21 | 
|  | ! Nuke_Em.SCP		Nuke the old documents in a folder
!
!	This script nukes all the documents in the folder specified by
!	$NUKE_FOLDER which have a modified date after $NUKE_NBSDATE.
!
	DECIMAL I
	DATE_CONVERT #TMP_DATE,$NUKE_NBSDATE,9
	GET OA$DISPLAY "Deleting documents older than " #TMP_DATE -
	 " in " $NUKE_FOLDER " ..."
	FORCE
	GET #I = 0
	FOR CAB$ WITH .FOLDER == $NUKE_FOLDER AND -
	  .MODIFIED_NBS:8 LT $NUKE_NBSDATE DO -
	 GET #DOCKEY = .FOLDER:30 .DOCNUM\\-
	 CABINET DELETE_DOCUMENT #DOCKEY\\-
	 .IF OA$STATUS THEN COMPUTE #I = #I + 1
!
	GET OA$DISPLAY = #I ' documents deleted'
!
! [End]
 | 
| 458.2 | A note (or is it a reply?) | BUFFER::VICKERS | If it helps a customer, DO IT | Thu Apr 09 1992 20:13 | 7 | 
|  |     Note that the script in .1 does not place the documents into the
    WASTEBASKET folder.  The documents go directly to document heaven.
    
    This may or not be considered a feature by the customer.
    
    Have fun,
    don
 | 
| 458.3 | SMOP | IOSG::MARCHANT | Only parrots succeed | Fri Apr 10 1992 13:21 | 33 | 
|  | >    Note that the script in .1 does not place the documents into the
>    WASTEBASKET folder.  The documents go directly to document heaven.
>    
>    This may or not be considered a feature by the customer.
    
    If the customer wants the documents placed in the WASTEBASKET folder,
    use `CAB DELETE_OR_REFILE' instead of `CAB DELETE_DOCUMENT'. So Don's
    script would look like:
! Nuke_Em.SCP		Delete the old documents in a folder
!
!	This script deletes all the documents to the WASTEBASKET from the
!	folder specified by $NUKE_FOLDER which have a modified date after
!	$NUKE_NBSDATE.
!
	DECIMAL I
	DATE_CONVERT #TMP_DATE,$NUKE_NBSDATE,9
	GET OA$DISPLAY "Deleting documents older than " #TMP_DATE -
	 " in " $NUKE_FOLDER " ..."
	FORCE
	GET #I = 0
	FOR CAB$ WITH .FOLDER == $NUKE_FOLDER AND -
	  .MODIFIED_NBS:8 LT $NUKE_NBSDATE DO -
	 CABINET DELETE_OR_REFILE .%KEY, OA$WASTEBASKET\\-
	 .IF OA$STATUS THEN COMPUTE #I = #I + 1
!
	GET OA$DISPLAY = #I ' documents deleted'
!
! [End]
    Cheers,
        Paul.
 |