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

Discus and support Cannot Delete Empty Folder "Directory Name is Invalid" in Windows 10 Support to solve the problem; 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... Discussion in 'Windows 10 Support' started by Pureblood89, Sep 7, 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.

    :)
     
    Pureblood89, Sep 7, 2016
    #1
  2. DESII1 Win User

    cannot delete empty folders windows 10. windows message 'cannot find folders'.

    I have this same problem, it has nothing to do with permissions. I can use the command prompt to delete and REN other folders. One of the folders just will not let me delete it.

    Note when I run a Dir /Q the owner is shown a "..." that is just three dots. All of the other directories show a standard format owner

    None of the answers below present a solution.

    Suggestions?

    Thx
     
    DESII1, Sep 7, 2016
    #2
  3. Cannot delete empty folder (The Handle Is Invalid)

    Hi,

    It could be that the folder is already corrupted. As for the error code 0x80070003 that is related to Windows updates, a third-party antivirus program is a well-known cause for this. For us to effectively assist you, kindly provide the information we need
    below:

    • Have you tried to take full control of the folder and then try to delete it?
    • Have you made any significant changes to your computer that could have triggered the issue?
    • To remove the possibility of updates being blocked, Are you using any third-party antivirus programs?
    • If yes, have you tried to disable them and check for necessary updates?

    Meanwhile, kindly follow the steps below to try taking ownership of the said folder and try to delete it.

    • Right-click on the folder in question and click on Properties.
    • Click on the Security tab.
    • Click on Edit under Group or User and select
      Add.
    • In the pop-up window, type Everyone under Enter the object names to select and click on
      Check names.
    • Click OK.
    • Select Full Control under Permissions for everyone.
    • Click Apply then OK.
    • Click OK.
    • Try deleting the folder.

    Do get back to us with the results and if you have any other concerns, don't hesitate to post back.
     
    Jomel_Santos, Sep 7, 2016
    #3
  4. Bree New Member

    Cannot Delete Empty Folder "Directory Name is Invalid"

    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).
     
    Bree, Sep 7, 2016
    #4
  5. 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.
     
    Pureblood89, Sep 7, 2016
    #5
  6. Bree New Member
    Time to boot Linux from a USB then. I once had to do that for a similar 'undeletable' file.
     
    Bree, Sep 7, 2016
    #6
  7. lx07 Win User
    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
     
    lx07, Sep 7, 2016
    #7
  8. Cannot Delete Empty Folder "Directory Name is Invalid"

    Cannot Delete Empty Folder "Directory Name is Invalid" [​IMG]


    Cannot Delete Empty Folder "Directory Name is Invalid" [​IMG]
     
    Pureblood89, Sep 9, 2016
    #8
  9. Bree New Member
    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?
     
    Bree, Sep 9, 2016
    #9
  10. Renaming does nothing, directory still invalid.
     
    Pureblood89, Sep 9, 2016
    #10
  11. Bree New Member
    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.
     
  12. Bree New Member
    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.
     
  13. Cannot Delete Empty Folder "Directory Name is Invalid"

    I tried the rmdir command, didn't work "directory path is invalid" again. I've also tried cmd prompt in winre and still didn't work. I've spent 20 minutes this morning talking to a Microsoft "technician" this morning named "Shid" he gave the the run around and told me to do things I've already tried, then he said. I'll send you an email to troubleshoot this problem. All the email told me to do was to clear out my temp folder... Can't Microsoft hire somebody who didn't grow up on a dirt road eating curry?
     
    Pureblood89, Sep 9, 2016
    #13
  14. cereberus Win User
    I am not sure I really want to reply given the last rather offensive comment which we do not accept on this forum.

    However, on the grounds this was a thoughtless comment and you amend your post, the answer is simple - use a live linux drive.
     
    cereberus, Sep 9, 2016
    #14
  15. EdTittel Win User
    You can also boot to the installer and run repair, or use Kyhi's WinPE disk, and delete files and directories via the command line. I document this in a recent blog post entitled "Anniversary Update Post-Install Cleanup" (8/31/2016).
    HTH,
    --Ed--
     
    EdTittel, Apr 4, 2018
    #15
Thema:

Cannot Delete Empty Folder "Directory Name is Invalid"

Loading...
  1. Cannot Delete Empty Folder "Directory Name is Invalid" - Similar Threads - Cannot Delete Empty

  2. the directory name is invalid

    in Windows 10 Gaming
    the directory name is invalid: after windows 10 install i get this message when i try to use my cd dvd playrt https://answers.microsoft.com/en-us/windows/forum/all/the-directory-name-is-invalid/c926c407-ebdd-4730-91de-be27bec8ff9e
  3. the directory name is invalid

    in Windows 10 Software and Apps
    the directory name is invalid: after windows 10 install i get this message when i try to use my cd dvd playrt https://answers.microsoft.com/en-us/windows/forum/all/the-directory-name-is-invalid/c926c407-ebdd-4730-91de-be27bec8ff9e
  4. the directory name is invalid

    in Windows 10 Drivers and Hardware
    the directory name is invalid: after windows 10 install i get this message when i try to use my cd dvd playrt https://answers.microsoft.com/en-us/windows/forum/all/the-directory-name-is-invalid/c926c407-ebdd-4730-91de-be27bec8ff9e
  5. The Directory Name Is Invalid

    in Windows 10 Drivers and Hardware
    The Directory Name Is Invalid: Today I updated this laptop. Now all I see for the last 5 hours is this message: The directory name is invalid error message won't stop since I updated this PC from Windows 7 to Windows 10. What do I have to clear or change or reset to get this to stop showing up,...
  6. Can Not Delete Directory ("The directory name is invalid")

    in Windows 10 Support
    Can Not Delete Directory ("The directory name is invalid"): I have a WD My Passport USB drive, which I use with my WD TV Live Plus media player. As best I can determine, the media player has corrupted some of the file entries on the drive. It appears to have somehow changed the NTFS MFT data such that these files are instead being...
  7. The directory name is invalid ?

    in Windows 10 Drivers and Hardware
    The directory name is invalid ?: Does anyone know the solution for the error 'The directory name is invalid '? I get this error whenever I put a cd or dvd in the cd/dvd rom drive. https://answers.microsoft.com/en-us/windows/forum/all/the-directory-name-is-invalid/ec110e94-85e6-470b-b771-45b5ff46e3cc
  8. Unable to delete a folder - Invalid folder name

    in Windows 10 Performance & Maintenance
    Unable to delete a folder - Invalid folder name: Unable to delete a folder on an external USB HDD. Tried with take ownership. Tried Takedown, and some options on Owner of Files and Folders - Change in Windows 10 - Windows 10 Forums I booted from USB (WinPE/Paragon) and accessed command prompt from there. Deleting the...
  9. The Directory Name Is Invalid

    in Windows 10 Support
    The Directory Name Is Invalid: OK, here's my situation. I have a Western Digital (WD) My Passport Ultra external USB hard drive. I use this as a media drive on my WD TV Live Plus media player. For some unknown reason, the media player will sometimes corrupt files on the My Passport drive. The net effect is...
  10. directory name is invalid

    in Windows 10 Support
    directory name is invalid: Hi I have just got this new desktop pc. After an update I am getting this annoying message, E:/ The directory name is invalid. I don't know what I have done. I did anything. I searched Google and found a post on this forum but I can't find the actual answer to the post. Just...