#!/usr/bin/perl -wuse strict;use warnings;use VMware::VIRuntime;Opts::parse();Opts::validate();Util::connect();my $folders = Vim::find_entity_views( view_type => "Folder", properties => ['name'] );foreach my $folder (@$folders) {print $folder->name . "\n";}Util::disconnect();BEGIN {$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;}
If you want to preserve the paths of each folder, requires a bit more logic.