0

I have accidentally changed my folder name to "D:" and I don't know how. I have tried renaming it using command but no luck with simple rename command in Windows 7. Is there any way to change it?

EDIT: Attached image enter image description here

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
Sujan
  • 278
  • 2
  • 3
  • 11
  • 2
    would copying out the contents and simply deleting it be an option? – Journeyman Geek Jul 18 '14 at 07:24
  • possible duplicate of [How to force Windows XP to rename a file with a special character?](http://superuser.com/questions/31587/how-to-force-windows-xp-to-rename-a-file-with-a-special-character), [How to delete (invalid) files with colon in their name under Windows](http://superuser.com/questions/165395/how-to-delete-invalid-files-with-colon-in-their-name-under-windows) – Bob Jul 18 '14 at 07:28
  • @DaveRook That one says it only applies to Services for UNIX (which was changed to Subsystem for UNIX-based Applications, and then deprecated as of Windows 8 and removed as of 8.1). I don't think it's applicable to normal Win32 usage, though it might still work. It's also needlessly complex and only really useful for continuous usage (their example was folders shared with *nix systems), rather than a one-off rename. – Bob Jul 18 '14 at 07:50
  • Fair comment Bob, removed it – Dave Jul 18 '14 at 08:16
  • @JourneymanGeek The folder D: doesn't have any contents. I cannot even delete it. – Sujan Jul 18 '14 at 09:25
  • To delete it, try using `del` in elevated command prompt – ᔕᖺᘎᕊ Jul 18 '14 at 09:48
  • Did you try the suggestion of Bob yet? Removing the directory with `del "\\?\c:\temp\D:"` (after copying out the contents). `c:\temp\ ` being the complete path to that directory. Otherwise i'm afraid you'll need to use a live-linux cd to correct this problem. – Rik Jul 18 '14 at 09:58
  • Yeah, nothing worked on Windows. The only option left is to remove using Linux. – Sujan Jul 21 '14 at 04:17

2 Answers2

0

In explorer, select the folder and press F2. Then type in a new name and press enter.

If this doesn't work, copy the content of the folder to a new folder, and delete the old folder.

LPChip
  • 59,229
  • 10
  • 98
  • 140
  • 2
    Neither of them works. Can you verify it before posting as an answer? – Sujan Jul 18 '14 at 09:14
  • 3
    I can't because normally you cannot make a folder named D:. Unless you can provide me with instructions on making such (but you said it was made by accident) I cannot confirm this, although normally it should work. – LPChip Jul 18 '14 at 11:06
0

Use a Linux live cd to delete folder. you can use Ubuntu, Kali linux etc. any of your choice.

Renju Chandran chingath
  • 1,465
  • 3
  • 12
  • 19