windows - Batch - check if null session connection exist -
i have shared location mapped no local drive. how can check if exist, ideally want query return true or false.  example: if exist \\\pc-name.domain.net echo true syntagm doesn't detect mapped location.
output of net use:
status       local     remote                    network  ------------------------------------------------------------------------------- ok                     \\pc-name.domain.net\ipc$                                                 microsoft windows network command completed successfully.      
this help:
@echo off /f "tokens=1,2,3" %%g in ('net use^| find "\\"') (   echo %%h exists )   where can set find need. specific instance search mapped below purely search ipc$
@echo off /f "tokens=1,2,3" %%g in ('net use^| find "ipc$"') (   echo %%h exists )      
Comments
Post a Comment