locked
Cannot delete an empty shared folder RRS feed

  • Question

  • There's an empty shared folder on my WHS PP3 server that I cannot delete.

    Within the WHS Console, on the Shared Folders dashboard, the folder has a Used Space value of "Empty", a Duplication value of "Off", and a Status value of "Healthy". When I press the Remove button and then press the Finish button on the resulting confirmation window the following error dialog appears:

    Failed to delete the shared folder
    The shared folder cannot be deleted because one or more files are open. Please close all open files and try again.

    When I click on the "Shared Folders on Server" icon on my Windows 7 desktop, the folder appears in the tree view portion of the window; however, it does not appear in the contents list on the right-hand portion of the window. If I click on the folder-in-question in the tree view portion of the window, the following generic error dialog appears:

    Windows cannot access \\<MyServerName>\<MySharedFolderInQuestion>
    Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems, click Diagnose.

    Pressing the "See details" button reveals the following additional information:

    Error code: 0x80070035
    The network path was not found.

    Any suggestions on how I should proceed?
    Wednesday, January 6, 2010 5:19 PM

Answers

  • Try restarting your server. It's possible that there's some process on your server that's holding a connection to that share.
    I'm not on the WHS team, I just post a lot. :)
    Wednesday, January 6, 2010 7:02 PM
    Moderator
  • Any ideas, anyone?
    Do you have any add-ins or apps installed on the server that might be automatically opening a file after a reboot?

    Although unsupported, you could try checking Computer Management from the server desktop (right click on My Computer > select Manage).  Once you open it, go to Shared Folders > Open Files.
    Tuesday, January 12, 2010 12:10 AM
    Moderator
  • I finally resolved this annoying problem. I'm posting my findings here in the interests of anyone else who might encounter this problem in the future.

    To summarize: A folder I no longer used and that I believed to be empty (I'll call it <MyFolder>) was present in the Shared Folder tab. When I attempted to remove the folder from the tab, the error "The shared folder cannot be deleted because one or more files are open. Please close all open files and try again." appeared. When I attempted to open the folder within the tab, the error "The network path was not found" appeared. When I viewed the server resources from my Win7 workstations, <MyFolder> wasn't present...and when I attempted to access the resource manually (i.e., Start > Run > \\<MyServer>\<MyFolder>, a "The network name cannot be found" error appeared.

    If I rebooted my WHS, the <MyFolder> folder and three subfolders appeared on my workstations in Windows Explorer and the command prompt. All of the subfolders appeared to be empty. By displaying hidden objects, however, I was able to see four objects--each with an ambiguous filename and no extension. When I tried to view or change the attribute of any of the objects or to delete any of the objects, however, I got a "The target of the symbolic link <MyFolder>\<path>\.. does not exist" error. And within a few minutes, the folder and subfolder disappeared from my workstations altogether--in both Windows Explorer and the command prompt. When I tried to access <MyFolder>, the "The network name cannot be found" error appeared again.

    The "The group or resource is not in the correct state to perform the requested operation" section on FAQ: How do I resolve file conflicts gave me the idea of examining the contents of the problematic folder from the WHS command prompt. I navigated to the D:\shares\<MyFolder> directory. The subfolders mentioned above were all present; however, there were no visible objects in any of them. When I issued a "DIR /ah" command, however, the four objects mentioned above appeared. "ATTRIB *.*" revealed the objects to be hidden and system. When I attemped to unhide and un-system the files via "ATTRIB -h *.*, "ATTRIB -s *.*", or "ATTRIB -h -s *.*", the error "Unable to change attribute" appeared. I stumbled upon the idea of deleting hidden the objects via "DEL *.* /ah". That worked; the hidden and system files were gone! After I did the same in all of the subfolders, I was able to remove the subfolders and then successfully remove the directory from the Shared Folder tab. So the problem is now resolved.

    I may never know how the hidden/system files got in this shared folder. More disturbing, however, is why WHS refused to even display the contents of the shared folder--displaying "The network path was not found", instead.

    • Marked as answer by cgwaters Sunday, November 7, 2010 9:21 PM
    Sunday, November 7, 2010 9:19 PM

All replies

  • Try restarting your server. It's possible that there's some process on your server that's holding a connection to that share.
    I'm not on the WHS team, I just post a lot. :)
    Wednesday, January 6, 2010 7:02 PM
    Moderator
  • Thanks. In response to your suggestion, I restarted the server just a few moments ago. I'm still unable to delete the shared folder. I get the same error messages.
    Thursday, January 7, 2010 3:15 AM
  • Any ideas, anyone?
    Monday, January 11, 2010 4:49 PM
  • I'm not sure it's supported but if you remote console to the server and look at the shares (not in WHS console but server 2003 Admin) then does the share show up? You could remove it here - BUT be carefull!

    Also, I think there is a SYSInternals app that shows you which files/folders are locked by which process.

    I'm away from home @ mo so can't give more detail but try web search on these

    Samalama
    Monday, January 11, 2010 5:26 PM
  • Any ideas, anyone?
    Do you have any add-ins or apps installed on the server that might be automatically opening a file after a reboot?

    Although unsupported, you could try checking Computer Management from the server desktop (right click on My Computer > select Manage).  Once you open it, go to Shared Folders > Open Files.
    Tuesday, January 12, 2010 12:10 AM
    Moderator
  • I'm not sure it's supported but if you remote console to the server and look at the shares (not in WHS console but server 2003 Admin) then does the share show up? You could remove it here - BUT be carefull!

    Removing a share from the underlying OS is not only unsupported, it's a really bad idea as WHS will have no knowledge of that occurring.  I would strongly advise against doing that.

    Also, I think there is a SYSInternals app that shows you which files/folders are locked by which process.

    I'm away from home @ mo so can't give more detail but try web search on these

    Samalama

    Tuesday, January 12, 2010 12:11 AM
    Moderator
  • I'm still getting the same error message about there being one or more files open when I attempt to remove the empty shared folder in the Shared Folders tab.

    The shared folder seems to have disappeared altogether from the "Shared Folders on Server" icon on my Windows 7 desktops.

    Perhaps coincidentally, I experienced an odd series of events with my WHS over the last 24 hours. The server has since been rebooted, but the empty shared folder still exists and cannot be removed.

    Computer Management ... > Open Files shows two entries:
    Open File                               Accessed By         Type         # Locks     Open Mode
    D:\shares\Software\Add-Ins                               Windows   0               Read
    D:\shares\Software\Add-Ins   ADMINISTRATOR   Windows   0               Read
    

    It's not clear to me whether either of these files has anything to do with the empty shared folder that can't be removed. In any case, I refrained from using the Computer Management tool to close either of these files.

    I have three add-ins installed: Disk Management (v1.0.9.8), Jungle Disk Online Backup (v1.02.2), and Windows Home Server Toolkit (v6.0.2639.0). Could one of these be somehow hanging on to the empty shared folder, thus preventing it from being removed? I paused the Jungle Disk add-in but still could not remove the empty shared folder.
    Monday, March 1, 2010 3:32 PM
  • I finally resolved this annoying problem. I'm posting my findings here in the interests of anyone else who might encounter this problem in the future.

    To summarize: A folder I no longer used and that I believed to be empty (I'll call it <MyFolder>) was present in the Shared Folder tab. When I attempted to remove the folder from the tab, the error "The shared folder cannot be deleted because one or more files are open. Please close all open files and try again." appeared. When I attempted to open the folder within the tab, the error "The network path was not found" appeared. When I viewed the server resources from my Win7 workstations, <MyFolder> wasn't present...and when I attempted to access the resource manually (i.e., Start > Run > \\<MyServer>\<MyFolder>, a "The network name cannot be found" error appeared.

    If I rebooted my WHS, the <MyFolder> folder and three subfolders appeared on my workstations in Windows Explorer and the command prompt. All of the subfolders appeared to be empty. By displaying hidden objects, however, I was able to see four objects--each with an ambiguous filename and no extension. When I tried to view or change the attribute of any of the objects or to delete any of the objects, however, I got a "The target of the symbolic link <MyFolder>\<path>\.. does not exist" error. And within a few minutes, the folder and subfolder disappeared from my workstations altogether--in both Windows Explorer and the command prompt. When I tried to access <MyFolder>, the "The network name cannot be found" error appeared again.

    The "The group or resource is not in the correct state to perform the requested operation" section on FAQ: How do I resolve file conflicts gave me the idea of examining the contents of the problematic folder from the WHS command prompt. I navigated to the D:\shares\<MyFolder> directory. The subfolders mentioned above were all present; however, there were no visible objects in any of them. When I issued a "DIR /ah" command, however, the four objects mentioned above appeared. "ATTRIB *.*" revealed the objects to be hidden and system. When I attemped to unhide and un-system the files via "ATTRIB -h *.*, "ATTRIB -s *.*", or "ATTRIB -h -s *.*", the error "Unable to change attribute" appeared. I stumbled upon the idea of deleting hidden the objects via "DEL *.* /ah". That worked; the hidden and system files were gone! After I did the same in all of the subfolders, I was able to remove the subfolders and then successfully remove the directory from the Shared Folder tab. So the problem is now resolved.

    I may never know how the hidden/system files got in this shared folder. More disturbing, however, is why WHS refused to even display the contents of the shared folder--displaying "The network path was not found", instead.

    • Marked as answer by cgwaters Sunday, November 7, 2010 9:21 PM
    Sunday, November 7, 2010 9:19 PM