I've been searching all over for an answer and I didn't get anywhere so far.
I wish to do the following:
Scan my LAN for one specific folder (which I know the name), in any computer. This folder is always shared with full access to everyone. When found, map it to an unused drive letter in Windows.
Tried this option from other question in stackoverflow, just to find the folder and host, but no sucess:
@echo off set folder=example for /f %%a in ('net view ^|find "\\"') do if not "%%a"=="\\%computername%" ( echo trying server "%%a" pushd "%%a" && ( for /d /r %%b in (%folder%*) do if /i "%%~nxb"=="%folder%" echo server "%%a" folder "%%b" popd ) ) pause
Thanks in advance!