Page 1 of 1

How to remove ghost network drive

Posted: Tue Aug 18, 2020 3:40 pm
by Executioner
I have my laptop which I was sharing a folder called: d:\Downloads - OLD
Last night I decided to move this to my E drive since it had more room than the D drive.

On my desktop now it shows both locations. How can I remove the d:\Downloads - OLD from being displayed on my desktop? The new one is now shown as E:\Downloads - OLD2.

Re: How to remove ghost network drive

Posted: Tue Aug 18, 2020 3:58 pm
by Executioner
Never mind. I figured it out after more searching. I used the "net share" command in a dos prompt.
net share Downloads - OLD /delete
on my laptop that originally had the share.

Re: How to remove ghost network drive

Posted: Tue Aug 18, 2020 5:08 pm
by Executioner
LOL that did not work even though on my laptop it said it was deleted. So on my desktop I still show that ghost share even after rebooting my desktop.

Re: How to remove ghost network drive

Posted: Tue Aug 18, 2020 5:32 pm
by Executioner
OK - I had to reboot the laptop! So now it works. Jeez...you would think that there would be an easier way to remove orphaned shares by using a right click then delete. What could be more simple? Or maybe windows should be smart enough to realize that the share was moved or deleted and ask me if I wanted to delete the reference shortcut.

Re: How to remove ghost network drive

Posted: Tue Aug 18, 2020 9:23 pm
by FlyingPenguin
Welcome to the wonderful world of Windows File Sharing. Been there, done that, bought the t-shirt.

Re: How to remove ghost network drive

Posted: Tue Feb 09, 2021 2:15 pm
by Executioner
Bring this up again - I have a share that won't delete. It reports that it does not exist, but when I issue the command "net share" it shows up as "H:\Music lossless". The command that I used to try and delete it was "net share H:\Music lossless /delete"

Re: How to remove ghost network drive

Posted: Tue Feb 09, 2021 2:33 pm
by FlyingPenguin
You may have to delete it by it's share name, which is not the full path. The full path no longer exists. If you accepted the default when you created the share, it's probably "Music lossless".

You're also going to need to use quotes because there's spaces in the file name. So try:
Net share "H:\Music lossless" /delete
Or
net share "Music lossless" /delete

Re: How to remove ghost network drive

Posted: Tue Feb 09, 2021 3:28 pm
by FlyingPenguin
Edited my initial reply.

Re: How to remove ghost network drive

Posted: Wed Feb 10, 2021 3:10 pm
by Executioner
Thanks Bob. This worked: net share "Music lossless" /delete

So if there are spaces, we need to use quotes?

Re: How to remove ghost network drive

Posted: Wed Feb 10, 2021 6:42 pm
by FlyingPenguin
Yup, otherwise the command line thinks it's {net share music}, with the bogus command lossless afterward. Any file path or file name with a space must be in quotes.