Would there be a way to delete a file in Livelink (OpenText Content Server 10 to be exact) from a command prompt?
I should delete more than 7000 documents, thus it would be quite slow to do it manually. I could generate the object ID's from SQL Server and ideally would run the delete calls one-by-one programmatically on command line.
You have many options to do it but not from the CMD.
....
It depends how many times you have to execute this job.
You can, of course, write a console app for deleting files in LiveLink. You can use LiveLink API (LAPI):
public static bool DeleteLLObject( int iNodeID, int iVolumeID)
{
try
{
LLSession mySession = new LLSession(strHost, iPort, string.Empty, strUser, strPwd);
LAPI_DOCUMENTS lapiDoc = new LAPI_DOCUMENTS(mySession);
int iResult = lapiDoc.DeleteObject(iVolumeID, iNodeID);
if (iResult != 0)
{
string strErrMsg = mySession.getErrMsg();
throw new Exception(strErrMsg);
}
}
catch (Exception ex)
{
var strMsg = string.Format("The object cannot be deleted due to the reason:\n\n{0}", ex.Message);
Console.Out.WriteLine(strMsg);
return false;
}
return true;
}
It will be hard to use this code for deleting of multiple files at onece, since you need to identify and enter Node Id and Volume ID for every file.
It is better to use LiveLink Explorer (as already suggested) or a third party tool like DMS-Shuttle for LiveLink. There is a 15 days trial: http://dms-shuttle.com/downloads/ . I am working for the vendor.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.