Delete a file in Windows with long filename

I was trying to build an project and somehow i imported the Apache Hadoop folder. The folder had the class file which was having very big name and it was inside lot of nested folder. I was unable to delete that file on my Windows System as it was constantly throwing error that “Cannot delete file: filename too long“. I had to delete that file to remove un-necessary baggage on my project. After searching on internet i found the way to delete these files. In this article we would understand how we can delete long filename from Windows systems.

– Go to command prompt by typing ‘cmd’ inside Start Menu search box or typing ‘cmd’ inside run box.
– Iterate through the directory where the filename is big
– Type dir /X (This would list the shortname and longname of the file)
– Type del [shortname] and this would delete the big filename from the system

Tagged . Bookmark the permalink.

One Response to Delete a file in Windows with long filename

  1. jaywon51 says:

    Well Long path tool is the best solution on this situation. You can try it from google. Thanks

Leave a Reply