Jump to content


Can't delete folder created in Linux from NTFS external HD

  • Please log in to reply
4 replies to this topic

#1 Pompeius



  • Joined: 28-October 08
  • Location: Colorado, USA

Posted 07 June 2009 - 04:14

On my WD external drive, I had backed up a my Ubuntu home folder, from ages ago. I don't need it, so I want to delete it. The problem is, that when I try to delete it, it says "The file name you specified is invalid or too long".

I tried to delete it using the rmdir /s command, but it failed as well.

#2 vetmarkjensen


    Linux noob since Red Hat 5.1

  • Joined: 02-October 03
  • Location: Middle Tennessee
  • OS: GNU/Linux
  • Phone: Android and iPhone

Posted 07 June 2009 - 10:39

Linux allows more characters in filenames than Windows does, so you might be running into problems with the filename.

Two options come to mind.
1. Use the "shortname" from a Windows(DOS) command prompt. This is the name that has the tilde in it, and and limited to the "8 plus 3" filename, like "progra~1"
2. Boot your Ubuntu LiveCD and delete it from there.

#3 ceminess


    When I’m confronted My demeanor turns from Jekyll into Hyde

  • Joined: 15-August 02
  • Location: Valparaiso, IN USA
  • OS: ArchLinux, OS X Mountain Lion, Windows 8

Posted 07 June 2009 - 10:45

If you use dir /x it will show the shortnames in the command prompt.

#4 Mattfart


    Resident One Post Wonder

  • Joined: 08-October 12

Posted 08 October 2012 - 02:36

With that kind of error message, you certainly would like to try using Long Path Tool to delete that. I have been having that kind of problem and someone referred me to this site: http://longpathtool.com/ and it did work :) I had it downloaded and loved the free trial.

#5 Growled


    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 17-December 08
  • Location: USA

Posted 08 October 2012 - 02:41

I always keep a Linux LiveCD for things like this. Usually Puppy these days.