It's not a device, it's a folder!
November 1, 2008 9:40 PM
Subscribe
How can I delete a folder in Windows that has a colon in the name?
While copying my music library back to my Windows machine (from previously being on Linux), I brought over a folder whose name contains a colon. Windows doesn't allow colons in file or folder names, so I don't know how this happened, but it did.
The problem is that I can't delete it. When I right-click and select delete or drag to the trash, Windows tells me "Cannot delete file: Cannot read from the source file or disk". It thinks I'm trying to specify a device, I think, because of the colon. In the Command Prompt I get the message "The filename, directory name, or volume label syntax is incorrect."
I can't rename the folder, either, or at least I don't know any other ways to do it than the ways that I've tried. I've tried wildcards in the Command Prompt.
Is there some trick that I don't know here? Or is there a character code that I can substitute or an escape character that I can prepend to the colon character in the Command Prompt? I know how to do this stuff in bash - what about Windows?
posted by dammitjim to technology (28 comments total)
1 user marked this as a favorite
posted by zsazsa at 9:42 PM on November 1, 2008