davebo4503
asked on
can't delete file with long name - dir /X doesn't work
Can't delete file with long name on win server 2016.
dir /X doesn't show short file name even after using fsutil command to allow 8.3 name
dir /X doesn't show short file name even after using fsutil command to allow 8.3 name
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Alan!
Next. if the long file name is partly due to a long directory path name, either shorten that name, move that folder down to the drive level, or make a directory juntction to it, then delete it.
Either one of these will work.
Move the deep linked directory to the drive root:
move C:\very\very\long\director
Make a directory junction (hardlink) to the deep linked directory.
mklink /j c:\r C:\very\very\long\director
del c::\r\myverylongfilename.f