Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a library with numerous folders and documents that I am trying to organize. The easy way would be to use explorer view, but I'm getting errors accessing it to which my internal help desk is essentially telling me "Sorry, that feature is flaky in SharePoint. We can't help you."

I'm fighting that battle still, but in the meantime I need to get some work done moving things around. Is there a way other than explorer view to move a file to a different folder in a library while preserving all the SharePoint metadata (revisions, etc.)?

BTW: I'm aware of this question, but I need to do it WITHOUT using explorer view.

share|improve this question
add comment

4 Answers

If you have a Publishing site elsewhere in the same site collection, users with enough privileges can move your items by using Site Content and Structure page. If not, then code/PowerShell seems the way.

By the way, what is the SharePoint version in your environment?

share|improve this answer
    
SharePoint 2010 (updated question to reflect that) –  JohnFx Feb 27 '13 at 15:38
add comment

The SPFolder/DocumentSet/SPFile has a MoveTo(newUrl) function that will do the trick. Still, I can't guarantee that the items inside the folder will move correctly. I have moved DocumentSets/Files and each time I do it the content type field does not carries its original value, so basically before moving the element you'll have to save the content type id/name inside a variable and then set it on the element you just moved.

Cheers.

PD: Remember the target library must support the same content types the source library does.

share|improve this answer
    
I'm moving it WITHIN a library, just to another folder. –  JohnFx Feb 27 '13 at 16:16
    
I haven't tried that kind of translation, but the same approach should work. The only thing you should do is to build the newUrl right. You need to do some concept-proof in order to check if the content types move smoothly –  Jaime Feb 27 '13 at 16:25
add comment

As someone mentioned earlier, CopyTo() and MoveTo() will handle what you are looking to do, but only within the same site. If you need to move files outside of the current site, then you'll need to do something like what is mentioned here.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfilecollection.aspx

I will be doing a blog post or series of posts on doing just that. You can check http://darrinbrandon.com from time to time and see if I've gotten the post done yet.

Regards, Darrin

share|improve this answer
add comment

Found the answer on my own.

(1) "Site Actions dropdown" - Select "Site Settings"
(2) Under "Site Administration" - Select "Content and Structure"

This will get you an explorer-like view (though not in explorer) where you can move files around within a document library.

share|improve this answer
    
that's exactly what I referred you to –  Alexey Krasheninnikov Feb 27 '13 at 19:12
    
The "Publishing site elsewhere in the same site collection" threw me. I have no idea how that was relevant –  JohnFx Feb 28 '13 at 3:42
    
Ok, if your site had no such control in the Site Actions menu, that would mean your site had not the Publishing site feature enabled. It is not advisable to enable Publishing on a site only for the sake of using the Site Content and Structure. If your site collection has both basic team site and publishing sites under the same root, then out of one of the publishing sites you can manage the content of team sites using Site Content and Structure. –  Alexey Krasheninnikov Mar 1 '13 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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