Page 1 of 1

How to display all shared folders

Posted: 01 May 2019 10:50
by Carl
Is there a way to display all shared folders on a given drive? Perhaps with a Power Filter?

Re: How to display all shared folders

Posted: 01 May 2019 10:54
by highend
What does "display" mean in this case, show all these folders in the current pane?

Re: How to display all shared folders

Posted: 01 May 2019 15:08
by Carl
highend wrote:
01 May 2019 10:54
What does "display" mean in this case, show all these folders in the current pane?
Yes.

Re: How to display all shared folders

Posted: 01 May 2019 15:13
by highend
Then use a script:

Code: Select all

    $drive  = regexreplace(gpc(, "drive") . ":\", "([\\.+(){\[^$])", "\$1");
    $wmic   = runret("%COMSPEC% /c wmic share get path");
    $shares = regexmatches($wmic, "$drive[^ ]+", <crlf>);
    paperfolder("Shares", $shares, , "nl");