Hi,
Do you have any code examples in C# or Visual Basic (Visual Studio 2010) where a file stored in Vault can be deleted programatically?
We are using Vault Professional 6.1.0
Thanks
KV
Delete file programatically
Re: Delete file programatically
Most of our C# examples are in this post here: http://support.sourcegear.com/viewtopic.php?f=31&t=8020.
In the Vault API download should be a .chm that has all the documentation. Look for ServerOperations.ProcessCommandDelete Method
In the Vault API download should be a .chm that has all the documentation. Look for ServerOperations.ProcessCommandDelete Method
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Delete file programatically
Hi Beth,
Thanks for the reply. Have got a VB version working well-
Dim fileVaultFilePathAndFileName(0) As String
' strVaultFilePathAndFileName is e.g. $/Test/Directory1/TestFil01.png
fileVaultFilePathAndFileName(0) = strVaultFilePathAndFileName
Try
ServerOperations.ProcessCommandDelete(fileVaultFilePathAndFileName)
lblTest8.Text = "*** DELETE FROM VAULT *** : " & strVaultFilePathAndFileName & " : DELETED O.K."
Catch ex As Exception
lblTest8.Text = "*** FAILED Delete from Vault *** " & strVaultFilePathAndFileName & " : " & ex.Message.ToString
End Try
Regards,
KV
Thanks for the reply. Have got a VB version working well-
Dim fileVaultFilePathAndFileName(0) As String
' strVaultFilePathAndFileName is e.g. $/Test/Directory1/TestFil01.png
fileVaultFilePathAndFileName(0) = strVaultFilePathAndFileName
Try
ServerOperations.ProcessCommandDelete(fileVaultFilePathAndFileName)
lblTest8.Text = "*** DELETE FROM VAULT *** : " & strVaultFilePathAndFileName & " : DELETED O.K."
Catch ex As Exception
lblTest8.Text = "*** FAILED Delete from Vault *** " & strVaultFilePathAndFileName & " : " & ex.Message.ToString
End Try
Regards,
KV