How to run "net share Documents /delete" to delete the share


  1. Posts : 57
    W7 Pro x64
       #1

    How to run "net share Documents /delete" to delete the share


    I used Box but then switched to another cloud service.

    I uninstalled the Box desktop app but in my Event Viewer I'm getting this:

    The server service was unable to recreate the share Documents because the directory E:\backups\My Box Files\Documents no longer exists. Please run "net share Documents /delete" to delete the share, or recreate the directory E:\backups\My Box Files\Documents.

    I tried searching Google for Please run "net share Documents /delete" to delete the share but there isn't much.

    Could someone tell me how I can do that? Is it simply clicking Start and typing that text in the search field?
      My Computer


  2. Posts : 1,049
    Windows 7 Pro 32
       #2

    No, you should type cmd and press Enter. That will open a command prompt window. In there is where you should type this.

    You can then type net share /? if you want more information about that specific command and its parameters.
      My Computer


  3. Posts : 2,468
    Windows 7 Ultimate x64
       #3

    Note that for net share to work, you need administrator access, so you must start an elevated cmd.
      My Computer


  4. Posts : 57
    W7 Pro x64
    Thread Starter
       #4

    Is there a command to see existing net shares?

    I tried net share /? but couldn't find it:

    Code:
    C:\Windows\system32>net share /?
    The syntax of this command is:
    
    NET SHARE
    sharename
              sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
                                   [/USERS:number | /UNLIMITED]
                                   [/REMARK:"text"]
                                   [/CACHE:Manual | Documents| Programs | BranchCache | None]
              sharename [/USERS:number | /UNLIMITED]
                        [/REMARK:"text"]
                        [/CACHE:Manual | Documents | Programs | BranchCache | None]
              {sharename | devicename | drive:path} /DELETE
              sharename \\computername /DELETE

    If I run net share Documents /delete is there any danger I could delete something I don't want to delete?
      My Computer


  5. Posts : 5,915
    Windows 10 Pro X64
       #5

    just type
    Code:
    net share
    in the command prompt
      My Computer


  6. Posts : 2,468
    Windows 7 Ultimate x64
       #6

    net share on its own lists all the current shares, the very same that you can find and manage in computer management.

    The /delete thing will just delete the share, that is, making it unavailable to other computers over network. The data itself that the share pointed to is unaffected at all.
      My Computer


  7. Posts : 57
    W7 Pro x64
    Thread Starter
       #7

    Interesting... I learned a few things today. Thanks! :)

    1. I did net share to get a list of shares and the share I'm supposed to delete isn't even there:

    Code:
    C:\Windows\system32>net share
    
    Share name   Resource                        Remark
    -------------------------------------------------------------------------------
    ADMIN$    C:\Windows                Remote Admin
    C$           C:\                             Default share
    print$       C:\Windows\system32\spool\drivers       Printer Drivers
    IPC$                                         Remote IPC
    E$           E:\                             Default share
    E            E:\
    Pictures     E:\Pictures
    Users        C:\Users
    Videos       E:\Videos
    Dell Laser Printer 1100    USB001       Spooled  Dell Laser Printer 1100
    Kyocera Mita KM-1650     USB002       Spooled  Kyocera Mita KM-1650
    The command completed successfully.
    2. So logically typing net share Documents /delete resulted in the following:

    Code:
    C:\Windows\system32>net share Documents /delete
    System error 3 has occurred.
    
    The system cannot find the path specified.
    3. Makes me wonder why I'm getting this in my Event Viewer:

    The server service was unable to recreate the share Documents because the directory E:\backups\My Box Files\Documents no longer exists. Please run "net share Documents /delete" to delete the share, or recreate the directory E:\backups\My Box Files\Documents.

    Any suggestions?

    Perhaps I should recreate the directory E:\backups\My Box Files\Documents and see what happens?
      My Computer


  8. Posts : 2,468
    Windows 7 Ultimate x64
       #8

    Maybe the folder that the share was referring to was deleted? Then the service may fail to list it (seems pretty much like a bug).

    What if you try to create the real path on Windows explorer? Does the share begins to list? And can you delete it afterwards?
      My Computer


  9. Posts : 57
    W7 Pro x64
    Thread Starter
       #9

    The problem is solved! Me happy! :)

    Here is what I did:
    1. create the folder manually (no more Warning from here on)
    2. delete the share manually (net share Documents /delete)
    3. delete the folder manually
    4. reboot

    Thanks to Tookeri, Alejandro85 and Dude!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:17.
Find Us