report UNC path of folder in a mapped
Posted: 05 Oct 2016 12:55
Hi All,
I am trying to put a batch together that searches through the mapped drives of PC, finds a specific folder, then reports back the full UNC of that folder.
A customer PC has say three mapped drives N:\ Y:\ S:\ I ask them before I visit to create a folder called "Folder_Work" in the root of their shared area.
When I run my installer package, I'd like some extra code to search "any mapped drive" for "Folder_Work" and report back the UNC of it.
For example:
*!Folder found!*
\\servername\shared_area\data\company-files\folder_work
then I can set that to do something else I need to do. I guess I need to output the shares from Net Use but not sure how to set that into the search routine?
Any tips would be welcome. Thanks
I am trying to put a batch together that searches through the mapped drives of PC, finds a specific folder, then reports back the full UNC of that folder.
A customer PC has say three mapped drives N:\ Y:\ S:\ I ask them before I visit to create a folder called "Folder_Work" in the root of their shared area.
When I run my installer package, I'd like some extra code to search "any mapped drive" for "Folder_Work" and report back the UNC of it.
For example:
*!Folder found!*
\\servername\shared_area\data\company-files\folder_work
then I can set that to do something else I need to do. I guess I need to output the shares from Net Use but not sure how to set that into the search routine?
Any tips would be welcome. Thanks