Windows 10: Cannot Delete Empty Folder "Directory Name is Invalid"

Page 1 of 2 12 LastLast
  1.    08 Sep 2016 #1

    Cannot Delete Empty Folder "Directory Name is Invalid"


    Long story short - Upgraded from windows 7 to windows 10 a few months ago, decided to backup Windows 7. Came to the realization that I wan't gonna downgrade and Windows.old was taking up substantial space so I decided to delete it via Disk Cleanup. One folder remained that I could not delete or compress, it was named "System.Printing.dll", all I could do was move it to my Desktop. Every time I try to delete or open it I get a message that saying that file in not accessible and the directory name is invalid. The folder isn't hurting anything, it's just an eyesore. Any help would be appreciated. Thank you.
      My ComputerSystem Spec


  2. Posts : 3,122
    10 Home x64 (1703) (10 Pro on 2nd pc)
       08 Sep 2016 #2

    Pureblood89 said: View Post
    One folder remained that I could not delete or compress, it was named "System.Printing.dll".
    Are you sure that's a folder? On my other Win7 PC it's an actual dll file under c:\windows\winsxs\...

    Perhaps its directory listing has been corrupted. Try running Chkdsk from an administrative command prompt and see if it fixes it.

    If that finds no errors, try right-clicking on it and select 'Properties'. On the Security tab the 'Advanced' button will let you take ownership. You should be able to delete it then.

    If that fails, try downloading Linux and make a bootable 'live' USB. From Linux you can delete anything you want (so be careful).
      My ComputersSystem Spec

  3.    08 Sep 2016 #3

    I've run chkdsk and sfc, no errors or corrupted files. I've reset file permissions, I've tried deleting is safe mode w/o networking - no avail.
      My ComputerSystem Spec


  4. Posts : 3,122
    10 Home x64 (1703) (10 Pro on 2nd pc)
       08 Sep 2016 #4

    Time to boot Linux from a USB then. I once had to do that for a similar 'undeletable' file.
      My ComputersSystem Spec

  5.    08 Sep 2016 #5

    Pureblood89 said: View Post
    I've tried deleting is safe mode w/o networking - no avail.
    It is quite common that you can't delete Windows.old but in safe mode? I don't believe you. The file you are trying to delete is "system.printing.dll" is not loaded in safe mode normally. Are you sure?

    Every upgrade I get xxxx.dll (from intel) that can't be deleted but I always can in safe mode.

    Anyway, if you really can't delete it (of course I could be wrong) then as @Bree says you could boot from Linux.

    Alternatively you could hold down the <shift> key and restart. That will reboot you into the RE environment. Go to a command line and then just delete it (or anything else).

    When you boot into WinRE then Windows directory is not locked and you can do what you want (as long as it is not encrypted). Just type delete C:\whatever\whatever.dll
      My ComputerSystem Spec

  6.    09 Sep 2016 #6

    lx07 said: View Post
    It is quite common that you can't delete Windows.old but in safe mode? I don't believe you. The file you are trying to delete is "system.printing.dll" is not loaded in safe mode normally. Are you sure?
    Click image for larger version. 

Name:	Screenshot (4).png 
Views:	3 
Size:	116.2 KB 
ID:	100695
    Click image for larger version. 

Name:	Screenshot (5).png 
Views:	4 
Size:	114.1 KB 
ID:	100696
      My ComputerSystem Spec


  7. Posts : 3,122
    10 Home x64 (1703) (10 Pro on 2nd pc)
       09 Sep 2016 #7

    Despite the name, it certainly appears to be a folder and not an actual dll - the 0 bytes size is a bit of a give-away.

    As windows complains that its name is invalid, have you tried renaming it?
      My ComputersSystem Spec

  8.    09 Sep 2016 #8

    Renaming does nothing, directory still invalid.
      My ComputerSystem Spec


  9. Posts : 3,122
    10 Home x64 (1703) (10 Pro on 2nd pc)
       09 Sep 2016 #9

    Pureblood89 said: View Post
    Renaming does nothing, directory still invalid.
    Did you actually succeed in renaming it, or did it fail with the 'invalid' error?

    Perhaps you can delete it by using its 8.3 name. Open a command prompt, then type cd Desktop to go into that directory. Now type dir /x to list the 8.3 names as well as the long names. Now try deleting it using its 8.3 short name.
      My ComputersSystem Spec


  10. Posts : 3,122
    10 Home x64 (1703) (10 Pro on 2nd pc)
       09 Sep 2016 #10

    Pureblood89 said: View Post
    Click image for larger version. 

Name:	Screenshot (5).png 
Views:	4 
Size:	114.1 KB 
ID:	100696
    In the command prompt I see you used the command 'del c:\users\gary\desktop\system.printing.dll'

    That won't actually work for a directory, you need to use the RMDIR command, DEL just works on files.
      My ComputersSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Hi Have a folder with some subfolders that just wont delete. Can move and rename. Cannot cut and paste to another drive. I have tried the following which results in the same, just doesnt delete. Takeownership Grant me admin CMD Prompt...
So I basically delete a folder, on my Disk D, and it doesn't vanish, it stays there empty and when I click on it, it says "Folder not accessible access is denied". It's driving me crazy cause sometimes even a explorer.exe restart won't fix....
Hi, I access my Outlook.com email through the Windows 10 Mail app - this is the same Microsoft Account that I sign into my laptop with. When I Right-Click on the Junk Folder and click on "Empty Folder", as I would so in Outlook or on...
I copied the (highly configured) start menu folder from an old computer to a new computer. After using this folder to help configure the new computer I want to delete it. Win10 won't let me.:( Is there a solution to this problem?
I cannot see or view any of my pictures. I click on a folder and it tells me its empty. When I click on properties, its obvious by the size of the file, that its still there. I Any ideas on how to fix this?
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 15:49.
Find Us