Delete All Versions - difference between Item and File methods

Aug 2, 2010 at 12:38 PM

Hi there,

Are you aware of any possible problems when using SPFileVersionCollection.DeleteAll Method?

The MSDN documentation states that this deletes ALL VERSIONS, whereas the SPListItemVersionCollection.DeleteAll Method states "Deletes the collection of versions except for the current version."

The documentation is sparse on MSDN.  If you use the List Item DeleteAll method your item versions will be removed, but if you inspect its related File versions, they are all still there.

I wrote a powershell script that identifies versions and also have a purge function like yours: when i run it the Item versions drops to ONE, however, the File versions drops to ZERO - which is not what I would expect.


Your thoughts on this would be most welcome!