Start a new topic

Vault folder structure

 Hello

probably a very simple question but I can't get a grip on it, overlooking something very basic I guess

is there a way via powervault to get a listing of the folder structure in vault


$/A/B/C/X

$/A/B/C/Y

$/A/B/C/Z

...

Thanks in advance for any hint

Regards

Patrick


Hello Patrick,

Thank you for reaching out to us. If i understood you correctly you want to have a listing of the folder structure in Vault and not just a list of all folders, is that correct?


Kind regards,

Manuel Cassan

Hello Manuel


yes, that's correct

one line per structure, as shown in the example

$/A/B/C/X

$/A/B/C/Y

$/A/B/C/Z

$/A/B/C/Z/AA


Regards

Patrick

Hello Patrick,

Unfortunately this can't be done using powerVault. It is possible to achieve something similar using the Vault API. One way to do this could be to get the root folder using

$rootFolder = $vault.DocumentService.GetFolderRoot()


Then get all subfolders of the root with:

$allFolders = $vault.DocumentService.GetFoldersByParentId($rootFolder.Id, $true)

The $true parameter is for recursive, so that all folders are taken.


After you have all folders you can create a foreach loop that loops $allFolders and simply output the property $folder.FullName that contains the Vault path of the folder. 


Kind regards,

Manuel Cassan


If this answered your question please mark this topic as solved, thank you.

 

Hello Manuel

SORRY

Thanks  a lot for the information
I suspected something like that
I'll give it a try with your suggestion

Best Regards and Thanks again
Patrick
Login or Signup to post a comment