Windows 10: Can Not Delete Directory ("The directory name is invalid")

Discus and support Can Not Delete Directory ("The directory name is invalid") in Windows 10 Support to solve the problem; 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... Discussion in 'Windows 10 Support' started by claytoncarney, Aug 26, 2019.

  1. 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 reported as directories.

    When I attempt to delete these "directories", I receive a "The directory name is invalid" error. The "directory" name is in fact valid and just to be sure, I've renamed the entries several times with simple names (test, corrupt, etc.). They still cannot be deleted.

    Here's what I've done over the last six hours trying to fix this problem:

    • chkdsk /f /r - no problems found
    • mounted drive from ubuntu. "directories" show size corresponding to the files, but have a directory attribute. can not delete - permission error.
    • tried numerous utilities (wise force delete, delete doctor, file assassin, etc) which fail to delete
    I've also examined the drive using Active Disk Editor. I can see that entities have the directory flag set. However, even changing the flag back to zero does not allow deletion.

    I suspect the answer may lie in editing the MFT, but I'm not familiar enough with the details of NTFS to know how to fix the problem.

    :)
     
    claytoncarney, Aug 26, 2019
    #1

  2. 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?
     
    claytoncarney, Aug 26, 2019
    #2
  3. Bree Win User
    Cannot Delete Empty Folder "Directory Name is 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.
     
  4. Can Not Delete Directory ("The directory name is invalid")

    The directory name is invalid

    Hi David,

    Since you have rebuilt your computer, it may have made some changes or installed some updates that might be causing the error message "G: \The directory name is invalid". However, let's check if there is a device that you can remove in Safely Remove Hardware
    utility. Follow these steps to access the utility:

    • Press the Windows icon + R on your keyboard.
    • Copy and paste this 'RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll".
    • Remove any device that you'll see in the utility.
    • Restart your computer, then observe if the issue will occur again.

    We're looking forward to your feedback.
     
    Carlos Tin, Aug 26, 2019
    #4
Thema:

Can Not Delete Directory ("The directory name is invalid")

Loading...
  1. Can Not Delete Directory ("The directory name is invalid") - Similar Threads - Delete Directory directory

  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. Directory Name Invalid error

    in Windows 10 Network and Sharing
    Directory Name Invalid error: Every time i try to open any file on my desktop word files, pdfs, etc the error message "The directory name is invalid" appears. Most of the time this issue appears with external drives and USB and not with the actual computer's drive itself. I have tried updating the drive...
  6. 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,...
  7. The Directory Name is Invalid - Macrium

    in Windows 10 Backup and Restore
    The Directory Name is Invalid - Macrium: [img] Anybody else seeing this old issue from v4 and v5 in v7.2.4524 and higher mounted images browsed on different 1909 PC's when attempting to open the file? Macrium Support Forum - The Directory Name is Invalid The Directory Name is Invalid - Macrium Support Hi...
  8. 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
  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...

Users found this page by searching for:

  1. delete folder the directory name is invalid