Linked In recommendations: Your job happiness Barometer
New features: .NET Compact Framework 3.5

Tiny Utility: Extract Sharepoint Template

Recently I needed to find out the internal contents of a few Sharepoint template file which has the extension "stp". Upon close observation it was observed that the file header started with "MSCF" which is the header for a cab file. I extracted the cab file and found an xml file called manifest.xml and a bunch of other files which looked like this.


When I looked closer I found that these are actually the files inside a sharepoint web site and the manifest.xml has the location where the files are located. But at the current extracted format the name and location of the files made no sense. However the mapping for these files are written in the manifest file.  So I wrote a small program that read from the manifest.xml file and moved the x0000.000 named files into appropriate folders and directories. So now we have a sharepoint template extraction utility. Please note that the manifest.xml may have a lot more file listed that was once present in your sharepoint site but those files may not present inside the template file thus is not extracted. It looked to me like the manifest file contained all garbage historical files.

To see this, please download Microsoft Cabinet SDK from from here:

Then compile this attached project and decompile your sharepoint template.


kick it on



You can use stsadm utility to export SP site contents. You can tell to stsadm if you want site to be exported as archive or as directory tree.

Shaun O'Reilly

How do you use stsadm, to export site contents as directory trees? I cannot find this option.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Comments are moderated, and will not appear until the author has approved them.

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)