Jeez, it's been a long time since I looked at this code!

If I understand your requirement correctly, put the following code in an If clause.., as shown here:
 Code:
If Right($PSTName, 3) <> '.mdc'
  ; determine if the PST is on a network drive. 
  For $_ = 0 to UBound($aMapped)
    If $aMapped[$_][0] = $Drv
      $IsNet = $_ ; is network! 
    EndIf
  Next

  ; Disassociate by deleting the registry key 
  ;'Disassociate'
  $_ = DelTree($aPSTKeys[$])

  ; Rename the file
  $NewPSTName = @USERID + '_' + Join(Split(Join(Split($PSTName, ' '), '_'), '.pst'), '.pst')
  ;'; move'
  Move $PSTPath + $PSTName $PSTPath + $NewPSTName
  $NewPSTPath = $NewPSTRoot
  Move $PSTpath + $NewPSTName $NewPSTPath + $NewPSTName
 
  $_ = RedirectOutput($LogPath + '\' + @WKSTA + @userid +'.txt')
EndIf
I noticed that you have commented the log messages, but have not disabled logging. When I used this script to eliminate PSTs and move their data into an archiving system, I found the logging helpful when things didn't go as planned.

The example IF clause allows anything EXCEPT .mdc files to process. If you want to restrict it to ONLY .pst files, change it to "If Right($PSTName, 3) = '.pst'" instead.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D