My requirement is whenever particular My Site is created default folder will appear, I don't want that default folder, so need to create a feature stapling on activated method whenever my site creation "default " folder should be deleted.

Can anyone tell me any sample code for folder deletion using feature stapling

  • why u dont need default folder ?
    – Nikhil J
    Aug 22, 2014 at 13:51
  • Quit asking the same question in slightly differing fashion, update you original question if you are looking for PowerShell or feature stapling ideas. Aug 22, 2014 at 15:45

1 Answer 1


Here is an explanation for the feature stapling. The example explains how to set the master page. In the feature event receiver code you can write the logic to delete the folder. Here is a sample code to delete a folder in sharepoint document library programmatically.

Not the answer you're looking for? Browse other questions tagged or ask your own question.