So first the commands you will run are simple STSADM commands on your SharePoint 2007 server. To run these commands you have to be an admin on the server and an admin for the sites you are exporting and importing the Task List to. There are two commands you will use they are listed below:
Export Command
stsadm -o gl-exportlist -url "http://yoursite/Documents/TaskList/AllItems.aspx" -filename "c:\docs" -includeusersecurity -versions 4 -nofilecompression
Import Command
stsadm -o gl-importlist -url "http://yoursite/" -filename "c:\docs" -includeusersecurity -updateversions 2 -nofilecompression -retargetlinks -sourceurl http://yoursite/Documents/TaskList/AllItems.aspx
You of course have to change the URLS to match your sites and the file names and locations to where you want to save the file. These two commands work perfectly to move a task list from one site to another; you can even move them cross domain or from one farm to another. The only catch is you have to install a WSP file that was written to make these two commands work. Without installing the WSP files these two commands do nothing other than come back with an error. The WSP file you have to install is just an extension of the STSADM commands that was written specifically for these two commands.
So to download and install the WSP file so that you can use the commands to move the Task List and attachments follow these steps:
Download the WSP file HERE
Put the file on the server you want to deploy the solution on (the server where the task list is located)
Open a command prompt to STSADM (I wrote an article how to add STSADM to your path, it might help)
Run the command stsadm -o addsolution -filename Lapointe.SharePoint.STSADM.Commands.wsp (make sure you are in the directory where you put the WSP file on the server, in my case C:\test)
Run the command stsadm -o deploysolution -name Lapointe.SharePoint.STSADM.Commands.wsp -immediate -allowgacdeployment
Run the command stsadm -o execadmsvcjobs
Once you have completed the commands and it didn't throw any errors then you are now ready to run the commands to export your Task List. To do this, follow these steps:
Login to the server you need to export the task list from (should be same server you just deployed the WSP file to)
Open a command prompt to STSADM (I wrote an article how to add STSADM to your path, it might help)
Run the command stsadm -o gl-exportlist -url "http://yoursite/Documents/TaskList/AllItems.aspx" -filename "c:\docs" -includeusersecurity -versions 4 -nofilecompression
Now if this completed with no errors you should be able to go to the file location C:\docs and see all of the files for the task list. Now you can go to any SharePoint Farm in any environment and import this task list with all of its attachments. Remember if you are importing the Task List to a different server you have to run through the install of the WSP file again on the new server before you can import the Task List and its attachments.
To import the task list follow these steps:
First if it's a new server make sure you go back through the WSP install steps above
Copy the files from where ever you exported the list ("C:\docs" was my example) to the new server
Open a command prompt to STSADM (I wrote an article how to add STSADM to your path, it might help)
Run the command stsadm -o gl-importlist -url "http://yoursite/" -filename "c:\docs" -includeusersecurity -updateversions 2 -nofilecompression -retargetlinks -sourceurl http://yoursite/Documents/TaskList/AllItems.aspx
Now you can go to the site where you imported the task list and all of your tasks should be there and more importantly all of your attachments will be there as well. I hope this guide helps you to get around the issue of exporting and importing Task Lists where the attachments don't import/export properly.
Published by TechTips
I am a senior systems engineer and enjoy writing articles about computers, technology and other electronics. View profile
Troubleshooting Your Windows XP Task BarSometimes the Windows XP operating system task bar migrates to other areas of the screen. Find out how to quickly and easily correct this problem in a matter of minutes.
The Task Centered Approach to TherapyA brief look at Task Centered Therapy, it's uses and faults. Includes an example of how task centered therapy works.- To-Do/Task Manager - NextyNexty is a GTD-based task manager that allows you to implement David Allen's principles in an easy way.
- To-Do/Task Manager - Wipee ListWipee List (http://www.wipeelist.com) is a simple, web-based task manager with several interesting features. Good for a simple GTD implementation or quick and dirty to-do lists.
- How to Clean Up Your Computer Easily with Security Task ManagerA few years ago I discovered Security Task Manager, a handy and free tool to remove viruses and trojans from your computer. This program is small, only 1,6 mb, and downloadable from
- TechTips - Create STSADM Shortcuts for SharePoint 2007
- TechTips -MOSS 2007 SharePoint People Picker Not Working
- TechTips - Application Pool Recycle Utility for SharePoint Developers
- President Obama and VP Biden Create Middle Class Task Force: "A Strong Middle Clas...
- How to Schedule a Program Using Task Scheduler
- Windows Server 2008: The Most Powerful Operating System Yet
- New Mammogram Guidelines by Government Task Force: Just the Beginning?




