Delete of Files

Delete of Files

matthew.greenDLCDJ
Enthusiast Enthusiast
313 Views
4 Replies
Message 1 of 5

Delete of Files

matthew.greenDLCDJ
Enthusiast
Enthusiast

I have a bunch of files I need to completely remove from Vault, the question is how since some items have been marked as released.  I have an Excel list of roughly 5,000 files that need to be completely removed.  I have tried the below but to no avail.  Any suggestions of what to use.

   Sub RemoveFiles(excelIds As Long())
        webMgr.DocumentService.DeleteFileVersionsByMasterIdsUnconditional(excelIds, True, 0, 1, Nothing)
    End Sub
0 Likes
314 Views
4 Replies
Replies (4)
Message 2 of 5

joe.corson
Contributor
Contributor

@matthew.greenDLCDJ 


have you tried using:
DocumentService.DeleteFileFromFolderUnconditional(file.MasterId, file.FolderId);

0 Likes
Message 3 of 5

matthew.greenDLCDJ
Enthusiast
Enthusiast

Thank you for offering this solution, however I cannot get it to work.  Even as Admin.

0 Likes
Message 4 of 5

joe.corson
Contributor
Contributor

are you getting any error?

0 Likes
Message 5 of 5

matthew.greenDLCDJ
Enthusiast
Enthusiast

No error which is making diagnosing impossible.

0 Likes