Page 1 of 2 12 LastLast
  1.    08 Sep 2016 #1
    Join Date : Sep 2016
    Florida
    Posts : 5
    Windows 10 Pro

    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.    08 Sep 2016 #2
    Join Date : Aug 2016
    S/E England
    Posts : 4,199
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Quote Originally Posted by Pureblood89 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
    Join Date : Sep 2016
    Florida
    Posts : 5
    Windows 10 Pro
    Thread Starter

    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.    08 Sep 2016 #4
    Join Date : Aug 2016
    S/E England
    Posts : 4,199
    10 Home x64 (1709) (10 Pro on 2nd pc)

    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
    Join Date : Jul 2015
    Posts : 3,656
    10 Pro

    Quote Originally Posted by Pureblood89 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
    Join Date : Sep 2016
    Florida
    Posts : 5
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by lx07 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.    09 Sep 2016 #7
    Join Date : Aug 2016
    S/E England
    Posts : 4,199
    10 Home x64 (1709) (10 Pro on 2nd pc)

    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
    Join Date : Sep 2016
    Florida
    Posts : 5
    Windows 10 Pro
    Thread Starter

    Renaming does nothing, directory still invalid.
      My ComputerSystem Spec
  9.    09 Sep 2016 #9
    Join Date : Aug 2016
    S/E England
    Posts : 4,199
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Quote Originally Posted by Pureblood89 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.    09 Sep 2016 #10
    Join Date : Aug 2016
    S/E England
    Posts : 4,199
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Quote Originally Posted by Pureblood89 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


Similar Threads
Thread Forum
Cant delete as "The file or directory is corrupted and unreadable"
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...
General Support
I delete a folder, it comes back and shows "Folder not accessible..."
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....
General Support
Unable to empty "Junk" folder in Windows 10 Mail App
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...
Browsers and Email
Can't delete a folder named "start menu"
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?
General Support
Windows 10 Pictures " this folder is empty"
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?
General Support
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 21:29.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums