It actually takes quite a bit more code if you want detail about what has been deleted. The sample below lists each file and attempts to delete it in turn, displaying the success/failure for each attempt.

This code will of course execute more slowly, which may or may not be significant depending on the number of users concerned.

 Code:
$=SetOption("WrapAtEOL","ON")
$sPrefix="Q:\Documents and Settings\"
$sSuffix="\documentum\viewed\"

$sEntry=Dir($sPrefix+"*")
While Not @ERROR
	If Exist($sPrefix+$sEntry+$sSuffix)
		"Match found for user "+$sEntry+@CRLF
		$sFileToDelete=Dir($sPrefix+$sEntry+$sSuffix+"*.*",1)
		While Not @ERROR
			If Not (16 & GetFileAttr($sPrefix+$sEntry+$sSuffix+$sFileToDelete))
				" Deleting file: "+$sFileToDelete+", RESULT: "
				Del $sPrefix+$sEntry+$sSuffix+$sFileToDelete
				IIF(@ERROR,"FAILED with error ["+@ERROR+"] "+@SERROR,"Success")+@CRLF
			EndIf
			$sFileToDelete=Dir(,1)
		Loop
	EndIf
	$sEntry=Dir()
Loop