When file names are too long and windows won't delete or rename for that reason, and dir /x doesn't work in CMD, here's one way to delete the file
Find the path of the file with the filename that is too long to delete
Navigate to the file, as if your going to create an archive withing the 7-zip or winrar application, right click on the file (or F2) and choose rename. Give the file a shorter name.
Success! the file now has a shorter name and can be deleted.
This worked well for me after my other option didn't work, opening the directory in a command prompt and using dir /x to display shorter names and deleting from there. The only listing it would give me would be the long file name again.
This method of renaming within 7-zip seems much simpler than the MS article outlining other ways of deleting a file with a filename too long, https://support.microsoft.com/en-gb/kb/320081
Hope this helps someone
Can't you just right click and rename? Just curious. Thanks
When it's too long, the right click menu gives you "Open, print, edit, mediainfo, open with, send to" no rename or delete. Plus shift-Delete and f2 do not work on these files either, I'm sure there is a work around but 7-zip is just so simple
Map a drive to the file location \\computername\adminshare\folderpath and then delete the file ie \\mypc\c$\folders. It can be on the same machine. It shortens the folder name to a single letter, then select the file name and then you can delete it.
Thanks for this. I used 7-Zip to rename two files and delete them out of a file server and backup versions on our NAS. They were both files saved by former staff and nobody here now needs them or wants them. The 7-Zip method was quick and easy for me. +100
Use "Long Path This very useful if you are having problems
in deleting, unlocking, copying and even renaming files, also very easy. - Juan Miller