pyvmomi-community-samples icon indicating copy to clipboard operation
pyvmomi-community-samples copied to clipboard

List empty directories in a datastore

Open zdxerr opened this issue 2 years ago • 0 comments

Describe the bug

I tried to list all all empty directories on a datastore but was not successful with

search_spec = vim.host.DatastoreBrowser.SearchSpec(query=[vim.host.DatastoreBrowser.FolderQuery()])
datastore.browser.SearchDatastoreSubFolders_Task(f"[{datastore.summary.name}]", search_spec)

Only directories like scratch are listed. What can I do about this?

Reproduction steps

...

Expected behavior

List all directories including empty ones, and ones containing vm specific files.

Additional context

No response

zdxerr avatar May 03 '23 14:05 zdxerr