The Easiest Way to Save and Share Code Snippets on the web

LFWF

vbnet

posted: Jan, 18th 2012 | jump to bottom

  1. Dim stringPathToFolderContainingShortcut as String = Me.TokenReplace("%(FindUsersFolder_OutputEntry_FullPath)")
  2. Dim Document as LFDocument = Me.Entry
  3. Dim AllShortcuts as ILFCollection = Document.GetAllShortcuts
  4.  
  5. For i As Integer = 1 to AllShortcuts.Count
  6.  
  7. Dim Shortcut as LFShortcut = AllShortcuts.Item(i)
  8. Dim ParentFolder as LFFolder = Shortcut.ParentFolder
  9.  
  10. If ParentFolder.FullPath = stringPathToFolderContainingShortcut
  11.  
  12. Try
  13.  
  14. 'Shortcut.Delete() <-- Uncomment after load testing
  15.  
  16. Catch ex As Exception
  17.  
  18. 'Supress exception.
  19.  
  20. End Try
  21.  
  22. End If
  23.  
  24. Next
16 views