cancel
Showing results for 
Search instead for 
Did you mean: 

alfresco api alternatives for python os.walk

Bro
Champ in-the-making
Champ in-the-making

I'd like to find all files from specific directory using python.

I've checked Alfresco Core API, first I found my desired folder with /queries/nodes, then I tried to check it's contents with /nodes/{nodeId}/children. But it returns all stored folders in that directory.

Any alternatives to :

for root, dirs, files in os.walk("/"):
        for d in dirs:
                if specific_folder in d:
                    for f in files:
Thanks
4 REPLIES 4

angelborroy
Community Manager Community Manager
Community Manager

Not sure to understand your requirement, but you may try using CMIS protocol:

https://chemistry.apache.org/python/cmislib.html

Hyland Developer Evangelist

Bro
Champ in-the-making
Champ in-the-making

cmislib is unauthorized. I can only use Alfresco core api or search api.

Bro
Champ in-the-making
Champ in-the-making

I want just to download all files from specific folders. 

fedorow
Elite Collaborator
Elite Collaborator

For search API use query with path and type, for example:

(PATH:'/app:company_home/st:sites/cm:yoursite/cm:documentLibrary//*') AND (+TYPE:'cm:content') AND (<your query for documents>)