I'm using Windows 7. After installing (and uninstalling) Ubuntu on my laptop, I found that it left a folder called ".Trash-1000" on my H drive. I cannot remove it: if I try to delete it from Explorer, it says:
The file name you specified is not valid or too long. Specify a different file name.
If I try to remove it from the command line, this is what happens:
H:\>rmdir .Trash-1000 /S /Q
.Trash-1000\files\Screenshot from 2013年09月24日 11:57:32.png - The filename, direct
ory name, or volume label syntax is incorrect.
.Trash-1000\files\Screenshot from 2013年09月24日 12:03:45.2.png - The filename, dire
ctory name, or volume label syntax is incorrect.
.Trash-1000\info\Screenshot from 2013年09月24日 11:57:32.png.trashinfo - The filenam
e, directory name, or volume label syntax is incorrect.
.Trash-1000\info\Screenshot from 2013年09月24日 12:03:45.2.png.trashinfo - The filen
ame, directory name, or volume label syntax is incorrect.
The files mentioned there are the contents of that folder. Using quotes around the folder name yields the same result. Trying to delete any of the sub-folders results in the same error, and trying to remove any of the files inside results in "No such file or directory".
As I said before, I no longer have Ubuntu installed. How can I remove this folder?
1 Answer 1
You can either use a Linux Live CD or install CygWin and use the rm command on it.
-
In cygwin, running the command
$ rm -rf H:/.Trash-1000results in the errorDevice or resource busyfor the subfolderfilesandDirectory not emptyfor the subfolderinfo. Haven't tried a live CD, I will report on that later.memo1288– memo12882013年10月28日 21:35:31 +00:00Commented Oct 28, 2013 at 21:35 -
Cygwin uses the same operating system functions as Explorer and Command Prompt.Kevin Panko– Kevin Panko2013年10月28日 21:46:15 +00:00Commented Oct 28, 2013 at 21:46
-
I had to delete it using the terminal in a live CD, and that worked. So, solved.memo1288– memo12882013年10月30日 17:23:52 +00:00Commented Oct 30, 2013 at 17:23
:which is not allowed to be in a file's name. I agree with the idea to use a Linux Live CD.