You can try the below code
// Get the document or folder you want to delete IDfSysObject folder = (IDfSysObject) session.getObject("<folder_id>");// Create a delete operation. IDfDeleteOperation delete = clientX.getOperation("Delete");// Add the document to the delete operation. delete.add(folder);// delete the document. Execute() runs all of the operation// steps in sequence.if(delete.execute() == false) { // Display an errors encountered to the user. // or throw exception }
You will need at least 3 dql's to achieve your requirement:- one to unlock the objects- another to delete just the documents- a last one to delete the folders
But you can do the following:- unlock all the objects- use Webtop or DA to delete the folder icspipeline.com and select:Folders: Delete the Selected Folder and All Sub Folders and Objects
Versions: Delete All Versions
Virtual Documents: Delete only the Virtual Document(s) Delete the Virtual Document(s) and all Descendants
To unlock all the documents first
Update dm_sysobject objects
set r_lock_owner =
set r_lock_machine =
set r_lock_date = date(
where r_lock_owner is not nullstring
and folder(
First delete all the objects under folder using DQL
delete dm_sysobject (all) objects where folder(ID('<folder_id>'),descend) or delete dm_sysobject (all) objects where folder('<folder_path>',descend)
then delete folder
delete dm_folder objects where r_object_id=