sharepoint

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.

a00000.000
b00000.000
...
...
x00000.000

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: http://support.microsoft.com/kb/310618

Then compile this attached project and decompile your sharepoint template.

Download SharePointExtractor.zip

kick it on DotNetKicks.com