The Directory Name Is Invalid


  1. Posts : 81
    Windows 10 Pro 64-Bit 21H1
       #1

    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 that a file is somehow changed into a directory.

    The problem is when I attempted to delete/remove the corrupted file/directory, I receive a 'The directory name is invalid.' error.

    I've tried the following:

    • Run chkdsk /f; no errors found.
    • Run WD Drive Utilities diagnostics; no errors found.
    • Checked dir /x looking for an 8.3 filename; no luck.
    • Taken ownership of the directory; no luck.
    • Tried a few file unlocker utilities; no luck (not reported as locked and delete fails).
    • Even tried an NTFS disk editor; no luck.

    I've spent the last three hours googling a solution. Nothing!

    Anyone else ever encountered something similar and found a solution?
      My Computer


  2. Posts : 81
    Windows 10 Pro 64-Bit 21H1
    Thread Starter
       #2

    Well, I just tried IObit Unlocker and that successfully deleted the directory.

    I am still interested in knowing about any native solution that does not required a third-party utility...
      My Computer


  3. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
       #3

    It used to happen in the old MSDOS days regularly - file and directory names would get corrupted and you had to do tricks with wildcard characters to get them deleted.

    Like with a file or folder that had one readable x in the 7th position of the 8 character filename, and the rest gibberish - sometimes it worked.
    ren *x?.* ffffffx?.*
    del f*.*
    rmdir or rd f*.* /s
    deltree f*.*
    etc.
      My Computers


 

  Related Discussions
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 05:01.
Find Us




Windows 10 Forums