Deletion of Documents (by version) within SharePoint

In regard to the Deletion of File(s) within a SP Library, if the File or Document has versioning on it, is there the ability to Filter or Delete by version? Example: Delete all versions of a Document that are below version 2?

Or is there some kind or sort of workaround that can be done to delete by version?

@scott.taylor

There is no direct way to do so

But one thing you can check if get the metadata of fileif that metadata contains info about version then you can create logic to get meta data for each file and then by validating we can filter and remove unwanted versions

But first you need to check if metadata gives that info

Cheers

Thanks! Yes, based on research, it does appear not a built in way to do this nor is there anything available within MarketPlace.

I did find an alternative using SharePoint API Calls though…if anyone is interested:

2 Likes