Tag Info

Hot answers tagged

52

Just moved (drag & drop) a file in Explorer View from one document library to another, and it did retain previous versions! Obviously both libraries need to have versioning enabled. Try it yourself. EDIT: note that it ONLY retains the versions if you MOVE the files. It does not do so when you perform a COPY!


10

Simply turn on versioning for the Document Library. It will retain the different versions of the PDF file. SharePoint doesn't care what type of file it is when it comes to keeping file versions.


8

As far as I know, the only way to upgrade a feature is by calling the Upgrade() method. Any other operation, including deactivation/reactivation, solution upgrade/update etc should in no way force a feature upgrade. I have upgraded some feature after a solution update in the past and they were NOT automatically upgraded by the Update-SpSolution cmdlet (I had ...


7

Last year I added functionality to Chris O'Brien's SharePoint Content Deployment Wizard to copy documents from one library to another. I'm pretty sure I tested that versioning copied over as well. Have a try of that and if you have any problems using it please leave me a comment here and I'll update my answer with more info.


7

Versioning is a feature available to items stored in SharePoint lists or libraries. If the content is not stored in SharePoint, the versioning feature is not available.


7

Sorry to hear that but lists themselves are not versioned, they cannot be rolled back. You may want to consider database or site collection backup/restore. You may still lose some data depending upon the backup schedule.


7

Sorry for localized version - it's a history list. Note marked link and url in status bar - it's archived version. So you can simply download. Edit Although when you hover over the Modified On value there is a dropdown list, the Save option isn't there. To save, right click on the Modifed On value and choose Save As. This will save the document version ...


6

SharePoint will store the full copy of any document/page for each version of that document/page. In some cases (as with Wiki pages), SharePoint will highlight content to show what changed from version to version, but with documents and pages, the entire file is stored in the content database. This is why storing multiple different versions of large documents ...


5

It is strongly discouraged to use assembly versioning in SharePoint unless you are prepared to manage all old SafeControl entries. Using versioning will only cause the errors you're seeing. Just don't use it. A better approach is to use the AssemblyFileVersion attribute. This is what I, and most of the community uses today to manage version numbers on ...


5

SharePoint always stores the full file. It never tries to do diffs. I haven't seen it documented regarding Site pages anywhere but if you ON A DEV BOX tries this: Create a new Team site with relative url "Team" Modify Home.aspx in SharePoint Designer Turn on Major/minor versioning of "Site Pages" Check out Home.aspx Modify Home.aspx in SharePoint Designer ...


4

As Anders mentions in his answer, my company SharePoint Products has a tool named CopyMove for just that. It is free to use for 1 named user - only organizations that need to offer the tool to their end-users will need to purchase a license. The product can copy/move documents, list items and folders with no loss of metadata, version history and ...


3

If you like the console/windows idea, you don't have to be limited to the client OM. You can create one using the server OM, you just have to run the console/windows app on one of the sharepoint servers. I personally would go with the console app using the server om route for this type of maintenance. If you feel like you would need to run this a lot or ...


3

In the workflow settings for your list/library, you should be able to select your first version of the workflow and set it to 'No new instances'. Workflows currently running of that version will continue, and new ones will be based off of the new workflow.


3

This is "by design" (for better or worse). The only workaround at this stage is to use JavaScript that can target this particular message. Trying to hide it using CSS is a bad idea as it will apply to all status bar messages which are very important for end users to see. There's an example script on Sohel's Blog: <script type="text/javascript"> ...


3

a way to move documents through doc lib is to use the Content Deployment API. using objects like SPExport and SPImport the copy, move actions of the content site and structure (sitemanagement.aspx) are performed using this API. and you can set that you want to keep the versions!


3

I know of no OOTB way to do this, so you would have to code this functionality yourself. I know that Lars Fastrup has created a tool that does just what you want: CopyMove for SharePoint It also has a web service API. hth Anders Rask


3

Your code will throw an exception when trying to instantiate a Managed Client Object Model Site object, just catch that and handle appropriately.


3

You'll have to make some kind of On Item Update functionality, whether it be a workflow (can be created via SharePoints userinterface) or an eventreceiver (custom code bound to lists via feature activation or console job) to get the current value of A and insert it into B.


3

Simplest option would be to use the "Send To -> Other location" functionality to create a link between the two documents. When the source document is changed, the user can be prompted to update the various copies in other locations that may exist.


3

This link has step-by-step instructions to restore your newform.aspx. Open the broken form and another working form in SP Designer, remove the ListFormWebPart from the page, then copy the ListFormWebPart from the unbroken page. You also have to update the List GUIDs to make sure the web part is pointing to the correct list. ...


3

Storage space. It's a good practice to use site quotas to manage growth. When you have versioning and don't have limits, each version adds additional storage as Sharepoint is making a copy of the original. In one document library, I had seen a file with 197 versions with no finite limit set. this one small file accounted for nearly 500 MB against the site ...


3

I typically advise to place "shared" libraries into a dedicated WSP and keep it out project or function specific WSPs. If a specific WSP is retracted, the "shared" library will still be available. Examples of "shared" libraries are: log4net, Enterprise Library, your own shared libraries, ...


3

I don't see why you can't use the OOB versioning functionality. If you enable versioning and content approval for your library and turn on major and minor versions, then whenever a document is submitted, it is marked as Draft and it gets assigned a minor version. You can then use a standard approval workflow (or customize it to suit your needs) to approve ...


3

Use SPListItem.UpdateOverwriteVersion() Updates the item without creating another version of the item. SPListItem.SystemUpdate method More Explanation


3

I know this is not quite an answer you may be looking for, but why not rename doc2.pdf to doc1.pdf and then rename it in SharePoint itself?


3

$web = Get-SPWeb -Identity http://sp2010 $list = $web.Lists["Documents"] $items = $list.Items foreach ($item in $items) { $file = $item.File $fileVersions = $file.Versions if ($fileVersions.Count -gt 0) { $fileVersions.Restore($fileVersions.Count - 1) } } UPDATE Please note that when any of ...


2

I have found that restoring a previous version will create a new version with information from the 'selected' version. It will not 'restore' and delete the 'current' version. IE: Version 1 Version 2 Version 3 If you restore version 1, it will become version 4, all 4 version will be available afterwards.


2

make sure that you use the SPFile object to get the Versions property from like below. Restoring an SPListItem will only restore the metadata not the binary document. SPListItem item = ... SPFile file = item.File; int versionCount = file.Versions.Count; if (versionCount > 0){ file.Versions.Restore(1); } Cheers /WW


2

I don't have an environment where I can test this but have some suggestions for you. Run a query to check if _IsCurrentVersion is TRUE. This may not relate to published versions but it's worth a try. Or the following query may be enough: <Where> <Contains> <FieldRef Name="_UIVersionString" /> <Value ...


2

No, this is not directly possible. You will need to upload and delete some dummy versions to do this. For example if you need the starting version number to be three simply start by uploading two small dummy versions and then delete them again. Performance can of course become an issue if you have many files with high version numbers.



Only top voted, non community-wiki answers of a minimum length are eligible