How to Delete Files with Long / Not Valid Filenames in Windows

December 23, 2008 – 8:36 am

I’ve experienced quite an annoying Windows problem yesterday. I tried to delete some files inside my Windows XP machine but this error kept popping out – Cannot delete <filename> – The file name you specified is not valid or too long. Specify a different file name. As you guess it, you can throw that suggestions into the dustbin cause it did not work. I’ve tried to rename the file, delete the file through command prompt and others but I ‘ve just wasted my precious time. Being curious as always, I Googled for solutions and was thankful that I find a software called Delinvfile.

Delinvfile (hope that in the future the author can think of a better, easier to remember name!) is short for “Delete invalid files and folders” and it really does what it says.

cannot-delete-file1

Here is how I solve the above problem with Delinvfile:

1- Install and run Delinvfile.

cannot-delete-file2

2- Choose the location of files / folders that you want to delete.

cannot-delete-file3

3- I want to delete some stubborn files inside a folder so I’ve chosen the “Delete Folder” tab. In case you just want to delete a file, choose “Delete File” instead.

cannot-delete-file4

4- Select the “Delete Folder via Short Name” option and confirm the folder deletion process.

cannot-delete-file5

5- File successfully deleted. Enjoice!

That is all that you need to do. Just in case you encounter any problem with file deletion (long, invalid file name etc.) in Windows in the future, this is the tool that you should look up for. Another Windows annoyance fixed, million thanks to Delinvfile!

Tags: , , , ,

Share!

Related Posts:


  1. 13 Responses to “How to Delete Files with Long / Not Valid Filenames in Windows”

  2. This problem and other related deletion problems like “cannot delete files because it’s in used” are a real pain to deal with.

    thanks for the recommendation. I will keep this tool on my arsenal, just in case I get a problem like this.

    By Nelson on Dec 23, 2008

  3. @Nelson: That is easy. You can solve that with Unlocker!

    By Syahid A. on Dec 23, 2008

  4. nice info!
    but i never come across this problem yet..

    By flip9 on Dec 23, 2008

  5. use ubuntu, and this problem will be gone..haha

    By aman on Dec 25, 2008

  6. @aman: Aww… Love that one too! But sometimes you have to occasionally use Windows too!

    By Syahid A. on Dec 25, 2008

  7. I use unlocker to delete those file/folder. You can get the software here: http://ccollomb.free.fr/unlocker/
    Very convenient if you want to delete the file/folder, eg for me, if i want to delete file that used(locked) by IIS, i just right click to delete with unlocker. Otherwise i have to stop IIS to delete the file/folder.

    By inertz on Dec 29, 2008

  8. @inertz: The problem is that the files are not locked, it is just undeletable. :D But yeah, “Unlocker” is still a cool product.

    By Syahid A. on Dec 29, 2008

  9. good thing i will use it if i need…..by the way the name is a bit hard to remember

    By Sohail on Feb 3, 2009

  10. I Installed your program and it did not work. I still have those corrupted files in my pendrive with the chinese chacarcters that i cannot delete neither rename.

    Thanks

    By ANA CARRILLO on Oct 3, 2010

  11. Hy. I ran into that damn problem too. And after days of searching I finally found this software: Long Path Tool.
    It’s GREAT. You can find it here: *ttp://www.longpathtool.com/
    Regards.

    By Ela on Nov 4, 2010

  12. I have used “Long Path Tool” in this situation and it helped me easily and quickly. This tool can fix all the error messages like:

    1. Path too long
    2. Cannot delete file: cannot read from source file or disk
    3. Cannot delete file: Access is denied
    4. There has been a sharing violation.
    5. The source or destination file may be in use.
    6. The file is in use by another program or user.
    7. The file name you specified is not valid or too long. Specify a different file name.

    and all other related error messages.
    I hope you will find this solution helpful and don’t forget to leave your comments.

    By JoshuaReen on Mar 7, 2012

  13. Long path tool will help you to solve this issue.

    By stevenManilov on Mar 20, 2013

  14. Long path tool is the best solution for your problem. try it and solve your problem.

    By franklo on Jun 20, 2013

Post a Comment