Posted by zieglers on August 18, 2010
Recently i was trying to move sharepoint files / folders (along with contents) programmatically. Finally i ended up using the method below. It is a neat helper method that you can use easily.
Note: Cross-web folder move is not supported!
Posted in IT Stuff, SharePoint | Tagged: FrontPage RPC, move, move documents, move folders, sharepoint, UploadData, WebClient | 2 Comments »
Posted by zieglers on August 13, 2010
In this post, i’ll mention an enhancement I recently implemented for ’Move Documents‘ bulk action in SharePoint.
Content explained in this post is additions and enhancements made to the topic explained in Bulk Move Documents
post. If you are not familiar with bulk move action, you can refer to that post before reading this one.
After developing bulk actions, i received some feedbacks on how to improve its functionality and make it more useful in SharePoint.
1. Move Documents within subsites (site-collection level)
Original functionality only supported moving documents from one library to another in the same web(subsite). It was suggested that being able to move documents from one subsite to another would be a good improvement to extend its scope of use.
So, i implemented that functionality. Now users can move documents from one library to another in a site-collection. Simply on move page, you first select destination web and then destination library as shown below.
2. Move documents with versions
Also another feedback was about to keep versions of documents during move operation. Although that was trickier, finally i managed to implement it. As an addition i included an extra comment in version history showing from which location documents were moved.
To begin with, I have two test docs in Shared Documents library. Those documents were editted 3 times after being uploaded so there are 4 versions in total as shown. As for this demonstration, i renamed titles as v0 (uploaded), v1, v2, v3 respectively.
Then, I move these 2 test docs using ‘Bulk Move’ action.
I select destination web and library.
After clicking OK, documents are moved to ‘Move Here‘ library in subsite-1.
Let’s check Version History of recently moved documents.
As you can see document was moved along with its versions. Also there is an extra comment showing where doc was moved from.
Feel free to download bulk move
in case you are interested. Also you are more than welcome to provide your feedback, comments and enhancement ideas.
Posted in IT Stuff, SharePoint | Tagged: Bulk, bulk move, destination, keep versions, move, move documents, sharepoint, source, Version History, versions | Leave a Comment »
Posted by zieglers on April 20, 2010
Here is another generic bulk action for SharePoint: Move Documents
Idea is similar to previous bulk actions i developed. Move operation will give more flexibility to users while working with documents in SharePoint libraries. It’ll help to organize your documents easily by allowing you to move them from one library to another in bulk.
Sounds simple, but there are many questions to ask on move operation. Here are 2 very important questions to answer:
- What if documents you are moving belong to one or more content types which don’t exist yet in destination library?
Answer: Before moving files, source and destination library content types are compared. Then, missing content types are added to destination library. In a way, destination library is prepared for move operation.
- What happens to metadata of the source documents after moving it?
Answer: All metadata of source documents is also moved along with documents.
DEMO: Here is a sample move operation performed on two sample files which belong to content types CT1 and CT2, being moved from ‘Documents’ library to ‘TestLib’.
1. Sample documents in source library
2. Select documents and go to Bulk Actions -> Move.
3. Select destination library, TestLib.
4. Selected documents have been moved to destination library. Source library is empty.
5. Moved documents are TestLib library.
6. Metadata is moved with documents as well.
Let me know if you have any questions, suggestions, or interested in this functionality.
Posted in IT Stuff, SharePoint | Tagged: Bulk, folders, move, move documents, organize, sharepoint | 17 Comments »