C:\_G\WWW\~ELISANET\INFO\tscmd111.html
<http://www.elisanet.fi/tsalmi/info/tscmd111.html>
Copyright © 2003- by Prof. Timo Salmi  
Last modified Fri 2-Nov-2018 15:51:18

 
Assorted NT/2000/XP/.. CMD.EXE Script Tricks
From the html version of the tscmd.zip 1cmdfaq.txt file
To the Description and the Index
 

This page is edited from the 1cmdfaq.txt faq-file contained in my tscmd.zip command line interface (CLI) collection. That zipped file has much additional material, including a number of detached .cmd script files. It is recommended that you also get the zipped version as a companion.

Please see "The Description and the Index page" for the conditions of usage and other such information.



111} How can I detect if a folder is shared or not?

The same method as in the previous item can be used e.g. to check if a folder is shared or not.
  @echo off & setlocal enableextensions
  set find_=C:\_M
  net share|find /i "%find_% ">nul
  if %errorlevel% EQU 0 (
    echo Folder "%find_%" is shared
    ) else (
    echo Folder "%find_%" is not shared or does not exist)
  endlocal & goto :EOF

References/Comments:
  net share

[Previous] [Next]

C:\_G\WWW\~ELISANET\INFO\tscmd111.html
C:\_G\WWW\~ELISANET\FTPCMD\TSALMI.CMD /tscmd111
http://www.elisanet.fi/tsalmi/info/tscmd111.html
file:///c:/_g/www/~elisanet/info/tscmd111.html