[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

458.0. "Can a folder be "PURGED"? " by KAOFS::D_STREET () Thu Apr 09 1992 20:50

    Hello,
    	 I have a 1-2-3 user who has enabled an ERRORLOG feature. The
    intent is to capture any error messages that may occur. If there
    are no errors, the document created in the users folder is empty.
    All of these "error" documents are in a folder by themselves. The
    user would like to purge these documents back automatically as there
    is one created each time an ALL-IN-1 users enters 1-2-3. Is there
    an easy way to clean up this folder? 
    
    (He is has ALL-IN-1 V2.4)
    
    						Derek Street
    
T.RTitleUserPersonal
Name
DateLines
458.1This script might serve as a starting pointBUFFER::VICKERSIf it helps a customer, DO ITThu Apr 09 1992 21:1121
! 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.2A note (or is it a reply?)BUFFER::VICKERSIf it helps a customer, DO ITThu Apr 09 1992 21:137
    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.3SMOPIOSG::MARCHANTOnly parrots succeedFri Apr 10 1992 14:2133
>    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.