How do I retrieve all share names and their directory paths from Windows 2016 server? Thanks!
You can start with the documentation for the Network Extender. For example,
https://docs.winbatch.com/mergedProjects/Win32Network/WIN32NET_WSN060.htm (https://docs.winbatch.com/mergedProjects/Win32Network/WIN32NET_WSN060.htm)
The extender and its documentation come preinstalled with your WinBatch+Compiler distribution.
You can also search the Tech Database for more examples and even some other approaches.
I am able to retrieve the share names with the command: list=wntShareList("\\SERVER", 1 | 16, 0)
How do I retrieve their directory paths/locations?
Thanks you!
You have the answer on your computer. Please review the wntShare* functions as documented in the Win32 Network Extender section of the Consolidated WIL Help file.
I was able retrieve all shares and their directory paths with the powershell command get-smbshare. Thanks
You could have done it with WinBatch by simply spending a couple of minutes with the help file. Apparently, that was too much work when, most likely, a PS cut and paste job was available. So be it.
Mentally, I always assume there's an implied "Using Winbatch," in front of people's questions, but I guess that's not always true. Make you wonder why they come here (of all places) and post the question. No insult -- I bet there is a very good reason -- I'm just not sure what it is.
Marty had a theory about it... I am mostly amazed at the vagaries of the human response to problem-solving. Yesterday a WinBatch user contacted us to let us know that "XYZ security" company's network appliance was blocking our domain. That meant that anyone in the world on a corporate network using the device could not gain access to our sites. We thanked the individual for informing us of the problem but mentioned that there was little we could do about it since we are not a customer of XYZ. This prompted the user, being a customer of XYZ to contact XYZ and requested they remove our domain from their block list. The WinBatch user did this on their own without our prompting mind you. XYZ complied with the request almost immediately.
I guess some individuals take the approach that problems are there to be solved.
There is much good going on in the world, and it often goes unnoticed.
Quote from: kdmoyers on September 23, 2021, 12:50:37 PM
Make you wonder why they come here (of all places) and post the question.
Good point, but perhaps bad circumstances. Outside the Json Extender threads, work Jim has been pursuing, some of the code I posted for Excel Power Query [which fell to deaf ears] a majority of the recent threads have been from newcomers to the forum, mostly with more general questions - i.e. "Does Winbatch work with Win 11"? Personally, I have always looked at this forum as a code exchange although some interesting more philosophical issues have been discussed.
I once ended up here looking for a C# solution, from a link in StackOverflow, just to discover the link was to a solution I had posted. It is nice when you can answer your own questions :)
Jim
The moderation of this site has been more or less hands-off up til now. The only request is to keep discussions centered around the title at the very top of the site home page. There is no shortage of sites for discussing almost anything you like so it is not asking too much to keep the topics WinBatch related.
Not sure what is meant by "philosophical issues" but suggesting that forum members be more specific with their questions is not a bad thing. As a rule general questions get general answers and specific questions get more specific answers if there is an answer to be had. Often formulating a specific question will lead to the answer before it is even asked.
Quote from: td on September 24, 2021, 12:14:28 PM
Not sure what is meant by "philosophical issues"
just wanted to see if I could type it w/out spell check. Other forums have, or are, getting strict about user questions and their relevance. Having pulled the 'homework' card on several user posts, I can understand and endorse more moderation of this forum... saves some of us being pricks.