• Move folders, subfolders and documents recursively

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #1719  by bragarwal
 
Hi,
I am currently using the OpenKM ver 3 on my machine and trying to use the exposed web services methods of OpenKM, I am trying to utilize the exposed method to customize.
Right now i am trying to create a method which can recursively move the folder, sub folder and its documents from source folder to destination folder.
I tried the already existing exposed method move of folder web services but it doesn\'t work recursively..?
Do you have any alternative solution to achieve this, if yes then can you please share the details with me.
 #1730  by pavila
 
This is a sample code and works fine (source folder has several documents and folders inside):
Code: Select all
from SOAPpy import WSDL

wsdlAuth = \'http://localhost:8080/OpenKM/OKMAuth?wsdl\'
wsdlFolder = \'http://localhost:8080/OpenKM/OKMFolder?wsdl\'
sAuth = WSDL.Proxy(wsdlAuth)
sFolder = WSDL.Proxy(wsdlFolder)

token = sAuth.login(arg0=\'admin\', arg1=\'admin\')
print \'Token: \'+token

sFolder.move(arg0=token, arg1=\'/okm:root/crisol\', arg2=\'/okm:root/pruebas\')

sAuth.logout(arg0=token)

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.